Browse Source

Add check for PowerShell 7 executable name (#218)

Grant Forrest 5 years ago
parent
commit
8cf10c6554
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/godot-tools.ts

+ 2 - 1
src/godot-tools.ts

@@ -85,9 +85,10 @@ export class GodotTools {
 					let cmdEsc = `"${cmd}"`;
 					let cmdEsc = `"${cmd}"`;
 					if (process.platform === "win32") {
 					if (process.platform === "win32") {
 						const POWERSHELL = "powershell.exe";
 						const POWERSHELL = "powershell.exe";
+						const POWERSHELL_CORE = "pwsh.exe";
 						const shell_plugin = vscode.workspace.getConfiguration("terminal.integrated.shell");
 						const shell_plugin = vscode.workspace.getConfiguration("terminal.integrated.shell");
 						let shell = (shell_plugin ? shell_plugin.get("windows", POWERSHELL) : POWERSHELL) || POWERSHELL;
 						let shell = (shell_plugin ? shell_plugin.get("windows", POWERSHELL) : POWERSHELL) || POWERSHELL;
-						if (shell.endsWith(POWERSHELL)) {
+						if (shell.endsWith(POWERSHELL) || shell.endsWith(POWERSHELL_CORE)) {
 							cmdEsc = `&${cmdEsc}`;
 							cmdEsc = `&${cmdEsc}`;
 						}
 						}
 					}
 					}