Skip to content
Merged
Prev Previous commit
MInor fix
  • Loading branch information
bebound committed Jan 23, 2024
commit 6fb6c8ef0fb056bf58799f691dbcaf73ecaff31b
2 changes: 1 addition & 1 deletion build_scripts/windows/scripts/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ REM Remove pywin32 help file to reduce size.
del %BUILDING_DIR%\Lib\site-packages\PyWin32.chm

if "%TARGET%"=="msi" (
echo Creating the wbin (Windows binaries) folder that will be added to the path...
REM Creating the wbin (Windows binaries) folder that will be added to the path...
Copy link
Contributor Author

@bebound bebound Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I use echo instead of REM, the (Windows binaries) folder will be parsed and folder was unexpected at this time. error will be raised. It seems there are some special rules when parentheses block is executed.
Repro script:

echo () ok
if 'kk'=='kk' (
    echo () ok2
)
() ok
ok2 was unexpected at this time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you truly need to use echo, you may quote the sentence:

echo "Creating the wbin (Windows binaries) folder that will be added to the path..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. (Generally, echo is able to print multiple word without the quote: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/echo)

In this instance, since the line functions more as a comment, so I changed it to REM.

mkdir %BUILDING_DIR%\wbin
copy %REPO_ROOT%\build_scripts\windows\scripts\az_msi.cmd %BUILDING_DIR%\wbin\az.cmd
copy %REPO_ROOT%\build_scripts\windows\scripts\azps.ps1 %BUILDING_DIR%\wbin\
Expand Down