From ef89292f7f5b1f93d08f18cf02225a235339f3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8C=C3=A1bera?= Date: Sat, 25 Jul 2020 20:40:56 +0200 Subject: [PATCH] fix(shims,bash): Handle spaces in path lukesampson/scoop#3878 --- lib/core.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core.ps1 b/lib/core.ps1 index 66938c8d1c..d9ecbe5aef 100644 --- a/lib/core.ps1 +++ b/lib/core.ps1 @@ -637,7 +637,7 @@ set invalid=`"=' if !args! == !invalid! ( set args= ) powershell -noprofile -ex unrestricted `"& '$resolved_path' $arg %args%;exit `$LASTEXITCODE`"" | Out-File "$shim.cmd" -Encoding Ascii - "#!/bin/sh`npowershell.exe -noprofile -ex unrestricted `"$resolved_path`" $arg `"$@`"" | Out-File $shim -Encoding Ascii + "#!/bin/sh`npowershell.exe -noprofile -ex unrestricted `"& '$resolved_path'`" $arg `"$@`"" | Out-File $shim -Encoding Ascii } elseif ($path -match '\.jar$') { "@java -jar `"$resolved_path`" $arg %*" | Out-File "$shim.cmd" -Encoding Ascii "#!/bin/sh`njava -jar `"$resolved_path`" $arg `"$@`"" | Out-File $shim -Encoding Ascii