Skip to content

Commit

Permalink
Fix: wrong directory when figuring out ssh
Browse files Browse the repository at this point in the history
When figuring out if ssh should be used then the ls check should be in
`$HOME/.ssh` not in the execution directory of `github-clone.sh`.
  • Loading branch information
nichtsfrei committed Oct 15, 2024
1 parent e651c93 commit 9f5576a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/github-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ -d "$target_dir" ]; then
exit 1
fi

if ls id_* &>/dev/null; then
if ls $HOME/.ssh/id_* &>/dev/null; then
if git clone [email protected]:$1.git "$target_dir"; then
echo "Cloning with SSH URL successful."
else
Expand All @@ -35,4 +35,4 @@ if ls id_* &>/dev/null; then
fi
else
git clone https://github.com/$1.git "$target_dir"
fi
fi

0 comments on commit 9f5576a

Please sign in to comment.