summaryrefslogtreecommitdiffstats
path: root/configure.bat
diff options
context:
space:
mode:
Diffstat (limited to 'configure.bat')
-rw-r--r--configure.bat7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.bat b/configure.bat
index 32fcdd86264..7e459317511 100644
--- a/configure.bat
+++ b/configure.bat
@@ -83,7 +83,12 @@ set REDO_FILE_PATH=%TOPQTDIR%\config.redo.last
set REDO_TMP_FILE_PATH=%TOPQTDIR%\config.redo.in
set FRESH_REQUESTED_ARG=
if not defined redoing (
- echo.%*>"%OPT_TMP_FILE_PATH%"
+ :: The '.' in 'echo.%*' ensures we don't print "echo is off" when no arguments are passed
+ :: https://devblogs.microsoft.com/oldnewthing/20170802-00/?p=96735
+ :: The space before the '>' makes sure that when we have a digit at the end of the args, we
+ :: don't accidentally concatenate it with the '>' resulting in '0>' or '2>' which redirects
+ :: into the file from a stream different than stdout, leading to broken or empty content.
+ echo.%* >"%OPT_TMP_FILE_PATH%"
cmake -DIN_FILE="%OPT_TMP_FILE_PATH%" -DOUT_FILE="%OPT_FILE_PATH%" -DIGNORE_ARGS=-top-level -P "%QTSRC%\cmake\QtWriteArgsFile.cmake"
) else (