Skip to content

Commit 2355cf0

Browse files
Fix tilde expansion in tue-install-git (#631)
Supersedes #631
2 parents 2bd6926 + 2436adb commit 2355cf0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.9
1+
1.3.10

installer/tue-install-impl.bash

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@ function tue-install-git
362362
do
363363
case $i in
364364
--target-dir=* )
365-
targetdir="${i#*=}" ;;
365+
targetdir="${i#*=}"
366+
targetdir="${targetdir/#\~/$HOME}"
367+
;;
366368
--version=* )
367369
version="${i#*=}" ;;
368370
* )
@@ -376,6 +378,7 @@ function tue-install-git
376378
tue-install-error "Target directory path cannot be empty"
377379
fi
378380

381+
local res
379382
if [ ! -d "$targetdir" ]
380383
then
381384
tue-install-debug "git clone --recursive $repo $targetdir"
@@ -401,7 +404,6 @@ function tue-install-git
401404
tue-install-info "URL has switched to $repo"
402405
fi
403406

404-
local res
405407
tue-install-debug "git -C $targetdir pull --ff-only --prune"
406408
res=$(git -C "$targetdir" pull --ff-only --prune 2>&1)
407409
tue-install-debug "res: $res"

0 commit comments

Comments
 (0)