From 5e809d27a7d33180a4db2ce55f7cd1b4e901b7ed Mon Sep 17 00:00:00 2001 From: Philipp Eder Date: Tue, 15 Oct 2024 09:54:10 +0200 Subject: [PATCH] Fix: wrong directory when figuring out ssh 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`. --- .devcontainer/github-clone.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/github-clone.sh b/.devcontainer/github-clone.sh index 79c5beec2..a4ff28c09 100755 --- a/.devcontainer/github-clone.sh +++ b/.devcontainer/github-clone.sh @@ -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 git@github.com:$1.git "$target_dir"; then echo "Cloning with SSH URL successful." else @@ -35,4 +35,4 @@ if ls id_* &>/dev/null; then fi else git clone https://github.com/$1.git "$target_dir" -fi \ No newline at end of file +fi