From 39b80ddba7cfe8ffdf076b1d5a24b4638014bb91 Mon Sep 17 00:00:00 2001 From: Ricardo Arenas Date: Fri, 10 Jul 2020 09:21:10 -0700 Subject: [PATCH] set DOTNET_CLI_HOME during CI --- eng/common/tools.ps1 | 5 ++++- eng/common/tools.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index d68684e2a16..22c3a9a8428 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -112,9 +112,12 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { # Disable first run since we do not need all ASP.NET packages restored. $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - # Disable telemetry on CI. + # On CI: + # Disable telemetry + # Set the CLI home directory to the build machine's workspace. if ($ci) { $env:DOTNET_CLI_TELEMETRY_OPTOUT=1 + $env:DOTNET_CLI_HOME=$env:AGENT_BUILDDIRECTORY } # Source Build uses DotNetCoreSdkDir variable diff --git a/eng/common/tools.sh b/eng/common/tools.sh index e94fce22ec3..b2f41127729 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -110,9 +110,12 @@ function InitializeDotNetCli { # Disable first run since we want to control all package sources export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - # Disable telemetry on CI + # On CI: + # Disable telemetry + # Set the CLI home directory to the build machine's workspace. if [[ $ci == true ]]; then export DOTNET_CLI_TELEMETRY_OPTOUT=1 + export DOTNET_CLI_HOME=$AGENT_BUILDDIRECTORY fi # LTTNG is the logging infrastructure used by Core CLR. Need this variable set