Skip to content

Commit d380a65

Browse files
committed
Fix for chatty bat files when path contains spaces
I have no idea what causes this issue but unless we code the path passed to `@if exist` then the commands within are echoed. This only happens when the path contains spaces, and only for the to commands within the `@if exist`. The endless mystery of cmd.exe. Fixes: #20913
1 parent c0c2ca1 commit d380a65

26 files changed

+26
-26
lines changed

bootstrap.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

em++.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

em-config.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

emar.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

embuilder.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

emcc.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

emcmake.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

emconfigure.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

emdump.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

emdwp.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
:: script is invoked via enclosing the invocation in quotes via PATH lookup, then %~f0 and
2323
:: %~dp0 expansions will not work.
2424
:: So first try if %~dp0 might work, and if not, manually look up this script from PATH.
25-
@if exist %~f0 (
25+
@if exist "%~f0" (
2626
set MYDIR=%~dp0
2727
goto FOUND_MYDIR
2828
)

0 commit comments

Comments
 (0)