diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index ed9f754ea83..d7e3799ebd9 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -122,7 +122,7 @@ try { . $configureToolsetScript } - if ($restore) { + if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) { InitializeNativeTools } diff --git a/eng/common/build.sh b/eng/common/build.sh index e14210632aa..d038959ab46 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -218,7 +218,7 @@ if [[ -n "${useInstalledDotNetCli:-}" ]]; then use_installed_dotnet_cli="$useInstalledDotNetCli" fi -if [[ "$restore" == true ]]; then +if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then InitializeNativeTools fi diff --git a/eng/common/native/install-cmake.sh b/eng/common/native/install-cmake.sh old mode 100644 new mode 100755