`pwsh` is the newer version of `PowerShell`, while the one that comes pre-installed on Windows is called `Windows PowerShell` and is an older version. I have no idea why Microsoft dose this and not updated the `Windows Powershell` on Windows. Release Notes: - N/A
Unified · Split
| @@ -886,7 +886,11 @@ fn to_windows_shell_variable(shell_type: WindowsShellType, input: String) -> Str · 885 unmodified lines | |||
| 886 | 886 | ||
| 887 | #[cfg(target_os = "windows")] | 887 | #[cfg(target_os = "windows")] |
| 888 | fn to_windows_shell_type(shell: &str) -> WindowsShellType { | 888 | fn to_windows_shell_type(shell: &str) -> WindowsShellType { |
| 889 | if shell == "powershell" || shell.ends_with("powershell.exe") { | 889 | if shell == "powershell" |
| 890 | || shell.ends_with("powershell.exe") | ||
| 891 | || shell == "pwsh" | ||
| 892 | || shell.ends_with("pwsh.exe") | ||
| 893 | { | ||
| 890 | WindowsShellType::Powershell | 894 | WindowsShellType::Powershell |
| 891 | } else if shell == "cmd" || shell.ends_with("cmd.exe") { | 895 | } else if shell == "cmd" || shell.ends_with("cmd.exe") { |
| 892 | WindowsShellType::Cmd | 896 | WindowsShellType::Cmd |