diff options
author | mikedn <onemihaid@hotmail.com> | 2017-05-28 02:09:11 +0300 |
---|---|---|
committer | Dan Moseley <danmose@microsoft.com> | 2017-05-27 16:09:11 -0700 |
commit | a90081b1d83f0447cace40b18ee908117d12b645 (patch) | |
tree | 7e631621f1610af721b0ecc4cecef92bc5a748fd | |
parent | 37c61722c3062d45f8ff3008424e02a759357afb (diff) | |
download | coreclr-a90081b1d83f0447cace40b18ee908117d12b645.tar.gz coreclr-a90081b1d83f0447cace40b18ee908117d12b645.tar.bz2 coreclr-a90081b1d83f0447cace40b18ee908117d12b645.zip |
Fix tool initialization detection (#11912)
init-tools.cmd attempts to create a file in a directory that doesn't exist. File creation fails and next time the script is run initialization will be performed again. That wastes a lot of time.
-rw-r--r-- | init-tools.cmd | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/init-tools.cmd b/init-tools.cmd index b69239bfe6..ef675ddc8d 100644 --- a/init-tools.cmd +++ b/init-tools.cmd @@ -10,7 +10,8 @@ if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/do set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt" set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\ set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild -set BUILD_TOOLS_SEMAPHORE=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%\init-tools.completed +set BUILD_TOOLS_SEMAPHORE_DIR=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION% +set BUILD_TOOLS_SEMAPHORE=%BUILD_TOOLS_SEMAPHORE_DIR%\init-tools.completed :: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated if [%1]==[force] ( @@ -73,5 +74,8 @@ if not [%INIT_TOOLS_ERRORLEVEL%]==[0] ( :: Create sempahore file echo Done initializing tools. +if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" ( + mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%" +) echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%" -exit /b 0
\ No newline at end of file +exit /b 0 |