We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e60ed9a commit 49536ecCopy full SHA for 49536ec
1 file changed
src/features/terminal/runInTerminal.ts
@@ -28,9 +28,17 @@ export async function runInTerminal(
28
deferred.resolve();
29
}
30
});
31
+
32
+ const shouldSurroundWithQuotes =
33
+ executable.includes(' ') && !executable.startsWith('"') && !executable.endsWith('"');
34
+ // Handle case where executable contains white-spaces.
35
+ if (shouldSurroundWithQuotes) {
36
+ executable = `"${executable}"`;
37
+ }
38
39
if (shellType === ShellConstants.PWSH && !executable.startsWith('&')) {
40
// PowerShell requires commands to be prefixed with '&' to run them.
- executable = `& "${executable}"`;
41
+ executable = `& ${executable}`;
42
43
execution = terminal.shellIntegration.executeCommand(executable, allArgs);
44
await deferred.promise;
0 commit comments