Skip to content

Commit 021d929

Browse files
committed
Fix variable expansion syntax in .bat files
To expand a variable Windows cmd interpreter requires variable name to be enclosed in percent characters (%), not prefixed with just one. post-install.bat: Version test had always been true, which resulted in rebase being done on *all* 32-bit Windows versions, not only version 10 and above (as was intended). setup-git-sdk.bat: The same side effects as for post-install.bat. Signed-off-by: Jacob Becker <[email protected]>
1 parent 0a1bef2 commit 021d929

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

post-install.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@REM We need to rebase just to make sure that it still works even with
1919
@REM 32-bit Windows 10
2020
@FOR /F "tokens=4 delims=.[XP " %%i IN ('ver') DO @SET ver=%%i
21-
@IF 10 LEQ %ver @(
21+
@IF 10 LEQ %ver% @(
2222
@REM We copy `rebase.exe` because it links to `msys-2.0.dll`
2323
@REM (and @REM thus prevents modifying it). It is okay to
2424
@REM execute `rebase.exe`, though, because the DLL base address

sdk-installer/setup-git-sdk.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@REM need to rebase just to make sure that it still works even with Windows 10
1717
@SET initialrebase=false
1818
@FOR /F "tokens=4 delims=.[XP " %%i IN ('ver') DO @SET ver=%%i
19-
@IF 10 LEQ %ver @(
19+
@IF 10 LEQ %ver% @(
2020
@SET initialrebase=false
2121
)
2222

0 commit comments

Comments
 (0)