Skip to content

Commit e77eddc

Browse files
committed
Support new PowerShell binary name
PowerShell binary is now called pwsh so this is checked for before falling back to the old binary name of powershell. Fixes #2
1 parent f720b7c commit e77eddc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/MonoDevelop.PowerShell/MonoDevelop.PowerShell/PowerShellPathLocator.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,15 @@ void FindPowerShellPath ()
5555
if (Platform.IsWindows) {
5656
PowerShellExePath = GetWindowsPowerShellExePath ();
5757
} else if (Platform.IsMac) {
58-
PowerShellExePath = "/usr/local/bin/powershell";
58+
PowerShellExePath = "/usr/local/bin/pwsh";
59+
if (!File.Exists (PowerShellExePath)) {
60+
PowerShellExePath = "/usr/local/bin/powershell";
61+
}
5962
} else {
60-
PowerShellExePath = "/usr/bin/powershell";
63+
PowerShellExePath = "/usr/bin/pwsh";
64+
if (!File.Exists (PowerShellExePath)) {
65+
PowerShellExePath = "/usr/bin/powershell";
66+
}
6167
}
6268

6369
PowerShellPathExists = File.Exists (PowerShellExePath);

0 commit comments

Comments
 (0)