Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit e887df8

Browse files
Add the execution policy when running powershell in size on disk benchmarks (#20680)
Since moving to the helix queue, we have been failing because the execution policy on the vms is not set to unrestricted. To get around this, we need to explicitly pass -ExecutionPolicy Bypass.
1 parent 603d65a commit e887df8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/src/sizeondisk/sodbench/SoDBench.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ private static void InstallSharedRuntime()
431431
var psi = new ProcessStartInfo() {
432432
WorkingDirectory = s_sandboxDir.FullName,
433433
FileName = @"powershell.exe",
434-
Arguments = $"-NoProfile .\\Dotnet-Install.ps1 -Runtime dotnet -InstallDir .dotnet -Channel {s_dotnetChannel} -Architecture {s_targetArchitecture}"
434+
Arguments = $"-NoProfile -ExecutionPolicy Bypass -File .\\Dotnet-Install.ps1 -Runtime dotnet -InstallDir .dotnet -Channel {s_dotnetChannel} -Architecture {s_targetArchitecture}"
435435
};
436436
LaunchProcess(psi, 180000);
437437
}
@@ -441,7 +441,7 @@ private static void InstallDotnet()
441441
var psi = new ProcessStartInfo() {
442442
WorkingDirectory = s_sandboxDir.FullName,
443443
FileName = @"powershell.exe",
444-
Arguments = $"-NoProfile .\\Dotnet-Install.ps1 -InstallDir .dotnet -Channel {s_dotnetChannel} -Architecture {s_targetArchitecture}"
444+
Arguments = $"-NoProfile -ExecutionPolicy Bypass -File .\\Dotnet-Install.ps1 -InstallDir .dotnet -Channel {s_dotnetChannel} -Architecture {s_targetArchitecture}"
445445
};
446446
LaunchProcess(psi, 180000);
447447
}

0 commit comments

Comments
 (0)