Skip to content

Commit 0a59896

Browse files
authored
Dispose helper when parsing args (#5126)
* Dispose helper when parsing args * Install script web is down
1 parent 532e6ce commit 0a59896

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

eng/common/tools.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
262262
if (!(Test-Path $installScript)) {
263263
Create-Directory $dotnetRoot
264264
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
265-
$uri = "https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"
265+
$uri = "https://raw.githubusercontent.com/dotnet/install-scripts/main/src/dotnet-install.ps1"
266266

267267
Retry({
268268
Write-Host "GET $uri"

eng/common/tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ function with_retries {
295295
function GetDotNetInstallScript {
296296
local root=$1
297297
local install_script="$root/dotnet-install.sh"
298-
local install_script_url="https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
298+
local install_script_url="https://raw.githubusercontent.com/dotnet/install-scripts/main/src/dotnet-install.sh"
299299

300300
if [[ ! -a "$install_script" ]]; then
301301
mkdir -p "$root"

src/vstest.console/InProcessVsTestConsoleWrapper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ internal InProcessVsTestConsoleWrapper(
126126
ProcessHelper.ExternalEnvironmentVariables = environmentVariableBaseline;
127127

128128
string someExistingFile = typeof(InProcessVsTestConsoleWrapper).Assembly.Location;
129-
var args = new VsTestConsoleProcessManager(someExistingFile).BuildArguments(consoleParameters);
129+
using var manager = new VsTestConsoleProcessManager(someExistingFile);
130+
var args = manager.BuildArguments(consoleParameters);
130131
// Skip vstest.console path, we are already running in process, so it would just end up
131132
// being understood as test dll to run. (it is present even though we don't provide
132133
// dotnet path, because it is a .dll file).

0 commit comments

Comments
 (0)