Skip to content

Commit a0cdace

Browse files
committed
Use bash array correctly
1 parent 633cce0 commit a0cdace

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

installer/tue-install-impl.bash

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,16 @@ function tue-install-git
497497
then
498498
tue-install-debug "git clone --recursive $repo $targetdir"
499499
res=$(git clone --recursive "$repo" "$targetdir" 2>&1)
500-
TUE_INSTALL_GIT_PULL_Q+=:$targetdir:
500+
TUE_INSTALL_GIT_PULL_Q+=("${targetdir}")
501501
else
502502
# Check if we have already pulled the repo
503-
if [[ $TUE_INSTALL_GIT_PULL_Q == *:$targetdir:* ]]
503+
if [[ ${TUE_INSTALL_GIT_PULL_Q[*]} == "${targetdir}" ]]
504504
then
505505
tue-install-debug "Repo previously pulled, skipping"
506506
# We have already pulled this repo, skip it
507507
res=
508508
else
509+
tue-install-debug "Repo not yet pulled, pulling"
509510
# Switch url of origin to use https/ssh if different
510511
# Get current remote url
511512
local current_url
@@ -522,7 +523,7 @@ function tue-install-git
522523
res=$(git -C "$targetdir" pull --ff-only --prune 2>&1)
523524
tue-install-debug "res: $res"
524525

525-
TUE_INSTALL_GIT_PULL_Q+=:$targetdir:
526+
TUE_INSTALL_GIT_PULL_Q+=("${targetdir}")
526527

527528
local submodule_sync_res submodule_sync_error_code
528529
tue-install-debug "git -C $targetdir submodule sync --recursive"

0 commit comments

Comments
 (0)