Fix external terminal title

Fixes #60806
This commit is contained in:
Daniel Imms 2018-10-16 14:35:48 -07:00
parent 8907e1ea86
commit 9b8d59a0ab

View file

@ -88,9 +88,13 @@ export class WinTerminalService implements ITerminalService {
return Promise.resolve(void 0);
}
// The '""' argument is the window title. Without this, exec doesn't work when the path
// contains spaces
const cmdArgs = ['/c', 'start', '/wait', '""', exec];
const cmdArgs = ['/c', 'start', '/wait'];
if (exec.indexOf(' ') >= 0) {
// The "" argument is the window title. Without this, exec doesn't work when the path
// contains spaces
cmdArgs.push('""');
}
cmdArgs.push(exec);
return new Promise<void>((c, e) => {
const env = cwd ? { cwd: cwd } : void 0;