Skip to content

Commit a68d726

Browse files
authored
Remove devcontainer folder if the git clone script fails (#263)
We need to reattempt git clone on devcontainer restart if the issue originates in the git-clone script. To do this, remove the devcontainer folder. Otherwise, the script sees the devcontainer folder exists and skips rerunning git-clone.
1 parent 22c7162 commit a68d726

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

startupscript/butane/004-git-clone-devcontainer.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ if [[ -d "${LOCAL_REPO}/.git" ]]; then
3333
exit 0
3434
fi
3535

36+
trap 'rm -rf ${LOCAL_REPO}' ERR
37+
3638
PRIVATE_DEVCONTAINER_ENABLED="$(get_metadata_value "private-devcontainer-enabled" "")"
3739
# Replace ssh URL with HTTPS URL
3840
https_url="${REPO_SRC/git@github.com:/https://github.com/}"

0 commit comments

Comments
 (0)