Skip to content

Commit 80c903d

Browse files
authored
Merge pull request dotnet#25737 from wtgodbe/Semaphore
Fix tool initialization detection
2 parents 11c01fb + 70f9e94 commit 80c903d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

init-tools.cmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/do
1010
set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt"
1111
set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
1212
set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild
13-
set BUILD_TOOLS_SEMAPHORE=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%\init-tools.completed
13+
set BUILD_TOOLS_SEMAPHORE_DIR=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
14+
set BUILD_TOOLS_SEMAPHORE=%BUILD_TOOLS_SEMAPHORE_DIR%\init-tools.completed
1415

1516
:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
1617
if [%1]==[force] (
@@ -26,6 +27,8 @@ if exist "%BUILD_TOOLS_SEMAPHORE%" (
2627

2728
if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
2829

30+
if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%"
31+
2932
if exist "%DotNetBuildToolsDir%" (
3033
echo Using tools from '%DotNetBuildToolsDir%'.
3134
mklink /j "%TOOLRUNTIME_DIR%" "%DotNetBuildToolsDir%"

0 commit comments

Comments
 (0)