Skip to content

Commit d0621e5

Browse files
committed
Switched to use minimum pwsh command: -Version
1 parent e81dad7 commit d0621e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Shared/Tests/PowerShellTestUtilities.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ public static bool WindowsEnvironment()
1515
string? powershellCommand = null;
1616
// Verify that the PowerShell command executes successfully.
1717
foreach(string command in
18-
new string[]{ "pwsh", WindowsEnvironment() ? "powershell" : null!}.Where(item=> item is not null))
18+
new string[]{ "pwsh", WindowsEnvironment() ? "PowerShell" : null!}.Where(item=> item is not null))
1919
{
2020
try
2121
{
22-
Process powershell = Process.Start(command, "-h");
22+
Process powershell = Process.Start(command, "-Version");
2323
powershell.WaitForExit();
2424
if (powershell.ExitCode == 0)
2525
{

0 commit comments

Comments
 (0)