Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Powershell Core Dectection
This will allow Powershell Core to be detected on Windows as Powershell instead of falling back to default cmd which causes errors when running commands like crc oc-env.
  • Loading branch information
stjeffrey authored and anjannath committed Feb 8, 2023
1 parent b1b8365 commit 6354417
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/os/shell/shell_windows.go
Expand Up @@ -64,6 +64,8 @@ func detect() (string, error) {
switch {
case strings.Contains(strings.ToLower(shell), "powershell"):
return "powershell", nil
case strings.Contains(strings.ToLower(shell), "pwsh"):
return "powershell", nil
case strings.Contains(strings.ToLower(shell), "cmd"):
return "cmd", nil
default:
Expand Down

0 comments on commit 6354417

Please sign in to comment.