Skip to content

Commit 92c85a0

Browse files
committed
[build-windows] Remove hard-coded C:
.. and use `%SystemDrive%` instead to enhance robustness.
1 parent 05b61be commit 92c85a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/build-windows.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ call :build_swift %exitOnError%
8383

8484
call :build_lldb %exitOnError%
8585

86-
path %PATH%;C:\Program Files\Git\usr\bin
86+
path %PATH%;%SystemDrive%\Program Files\Git\usr\bin
8787
call :build_libdispatch %exitOnError%
8888

8989
path %install_directory%\bin;%build_root%\swift\bin;%build_root%\swift\libdispatch-prefix\bin;%PATH%
@@ -142,7 +142,7 @@ set file_name=icu4c-%icu_version%-Win64-MSVC2017.zip
142142
curl -L -O "https://github.com/unicode-org/icu/releases/download/release-%icu_version_dashed%/%file_name%" %exitOnError%
143143
:: unzip warns about the paths in the zip using slashes, which raises the
144144
:: errorLevel to 1. We cannot use exitOnError, and have to ignore errors.
145-
"C:\Program Files\Git\usr\bin\unzip.exe" -o %file_name% -d "%source_root%\icu-%icu_version%"
145+
"%SystemDrive%\Program Files\Git\usr\bin\unzip.exe" -o %file_name% -d "%source_root%\icu-%icu_version%"
146146
exit /b 0
147147

148148
goto :eof
@@ -156,7 +156,7 @@ setlocal enableextensions enabledelayedexpansion
156156

157157
set file_name=sqlite-amalgamation-3270200.zip
158158
curl -L -O "https://www.sqlite.org/2019/%file_name%" %exitOnError%
159-
"C:\Program Files\Git\usr\bin\unzip.exe" -o %file_name% %exitOnError%
159+
"%SystemDrive%\Program Files\Git\usr\bin\unzip.exe" -o %file_name% %exitOnError%
160160

161161
goto :eof
162162
endlocal

0 commit comments

Comments
 (0)