Skip to content

Commit

Permalink
Double quote PATH declaration in win32.bat
Browse files Browse the repository at this point in the history
Failing to do so can introduce problems when some of the directories in
include spaces in their paths, eventually manifesting themselves as
weird "is not recognized as an internal or external command,
operable program or batch file" errors.

See: balena-io/etcher#1025
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
Juan Cruz Viotti committed Jan 27, 2017
1 parent 3a601e6 commit 29268b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/win32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

:: Ensure System32 is in the PATH, to avoid weird
:: 'cscript' is not recognized as an internal or external command"" errors.
set PATH=%PATH%;%SYSTEMROOT%\System32

:: We double quote the whole thing to prevent file
:: name spaces from messing up the PATH variable.
:: See https://github.com/cmderdev/cmder/issues/443#issuecomment-150202124
set "PATH=%PATH%;%SYSTEMROOT%\System32"

cscript //nologo "%~f0?.wsf"
exit /b
Expand Down

0 comments on commit 29268b5

Please sign in to comment.