Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6f8c0a

Browse files
committed
Issue #21907: Avoid using double quotes to check argument values.
Double quotes in expanded variables can match literal double quotes, which makes for a big mess when passing in a quoted argument (like "/p:externalsDir=..\externals", for example).
1 parent cb09dca commit c6f8c0a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

PCbuild/build.bat

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ set target=Build
1616
set dir=%~dp0
1717

1818
:CheckOpts
19-
if "%1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
20-
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
21-
if "%1"=="-r" (set target=Rebuild) & shift & goto CheckOpts
22-
if "%1"=="-d" (set conf=Debug) & shift & goto CheckOpts
23-
if "%1"=="-e" call "%dir%get_externals.bat" & shift & goto CheckOpts
19+
if '%1'=='-c' (set conf=%2) & shift & shift & goto CheckOpts
20+
if '%1'=='-p' (set platf=%2) & shift & shift & goto CheckOpts
21+
if '%1'=='-r' (set target=Rebuild) & shift & goto CheckOpts
22+
if '%1'=='-d' (set conf=Debug) & shift & goto CheckOpts
23+
if '%1'=='-e' call "%dir%get_externals.bat" & shift & goto CheckOpts
2424

25-
if "%platf%"=="x64" (set vs_platf=x86_amd64)
25+
if '%platf%'=='x64' (set vs_platf=x86_amd64)
2626

2727
rem Setup the environment
2828
call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" %vs_platf%

0 commit comments

Comments
 (0)