From 80154fa19e32eac4b74e7f5cc3640cfeee835ddd Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Wed, 4 Sep 2013 10:51:31 +1000 Subject: [PATCH] don't include trailing slash when setting $HOME for MSYS progs --- lib/core.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core.ps1 b/lib/core.ps1 index 8201eb2a..ffe5e501 100644 --- a/lib/core.ps1 +++ b/lib/core.ps1 @@ -88,7 +88,7 @@ function shim($path, $global) { # note: use > for first line to replace file, then >> to append following lines echo '# ensure $HOME is set for MSYS programs' > $shim - echo "if(!`$env:home) { `$env:home = `"`$home\`" }" >> $shim + echo "if(!`$env:home) { `$env:home = `"`$home`" }" >> $shim echo "`$path = '$path'" >> $shim echo 'if($myinvocation.expectingInput) { $input | & $path @args } else { & $path @args }' >> $shim @@ -96,7 +96,7 @@ function shim($path, $global) { if($path -match '\.exe$') { $shim_cmd = "$(strip_ext($shim)).cmd" ':: ensure $HOME is set for MSYS programs' | out-file $shim_cmd -encoding oem - '@if "%home%"=="" set home="%homedrive%%homepath%\"' | out-file $shim_cmd -encoding oem -append + '@if "%home%"=="" set home="%homedrive%%homepath%"' | out-file $shim_cmd -encoding oem -append "@`"$path`" %*" | out-file $shim_cmd -encoding oem -append } }