Skip to content

Commit 1581fa8

Browse files
Tweak the invoke-unix.bat script to not pathify -args
1 parent 2f5ac44 commit 1581fa8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

util/invoke-unix.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ IF EXIST C:\Cygwin\bin (
2525

2626
REM Obscure way to get the cmd.exe equivalent to `...` substitution
2727
FOR /F "usebackq tokens=*" %%x IN (`C:\Cygwin\bin\cygpath.exe %CD%`) DO SET cygwin_cd=%%x
28-
FOR /F "usebackq tokens=*" %%x IN (`C:\Cygwin\bin\cygpath.exe !commands!`) DO SET cygwin_cmd=!cygwin_cmd! %%x
28+
FOR %%x IN (!commands!) DO (
29+
FOR /F "usebackq tokens=*" %%y IN (`C:\Cygwin\bin\bash.exe -c 'if [[ %%x ^=^= -* ]] ^; then echo %%x ^; else /bin/cygpath %%x ^; fi'`) DO SET cygwin_cmd=!cygwin_cmd! %%y
30+
)
2931

3032
SET PATH=C:\Cygwin\bin:%PATH%
3133
C:\Cygwin\bin\bash.exe -c 'cd !cygwin_cd! ^&^& !cygwin_cmd!'

0 commit comments

Comments
 (0)