Skip to content

Commit 26d62c4

Browse files
authored
Terminal's with waitOnExit === true shouldn't print wait string (microsoft#61229)
Fixes microsoft#58371
1 parent 6b661d0 commit 26d62c4

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ export class TerminalTaskSystem implements ITaskSystem {
531531
} else if (task.command.presentation.showReuseMessage) {
532532
waitOnExit = nls.localize('reuseTerminal', 'Terminal will be reused by tasks, press any key to close it.');
533533
} else {
534-
waitOnExit = '\u200B';
534+
waitOnExit = true;
535535
}
536536
}
537537
let shellLaunchConfig: IShellLaunchConfig | undefined = undefined;

src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -834,12 +834,12 @@ export class TerminalInstance implements ITerminalInstance {
834834
if (exitCode) {
835835
this._xterm.writeln(exitCodeMessage);
836836
}
837-
let message = typeof this._shellLaunchConfig.waitOnExit === 'string'
838-
? this._shellLaunchConfig.waitOnExit
839-
: nls.localize('terminal.integrated.waitOnExit', 'Press any key to close the terminal');
840-
// Bold the message and add an extra new line to make it stand out from the rest of the output
841-
message = `\n\x1b[1m${message}\x1b[0m`;
842-
this._xterm.writeln(message);
837+
if (typeof this._shellLaunchConfig.waitOnExit === 'string') {
838+
let message = this._shellLaunchConfig.waitOnExit;
839+
// Bold the message and add an extra new line to make it stand out from the rest of the output
840+
message = `\n\x1b[1m${message}\x1b[0m`;
841+
this._xterm.writeln(message);
842+
}
843843
// Disable all input if the terminal is exiting and listen for next keypress
844844
this._xterm.setOption('disableStdin', true);
845845
if (this._xterm.textarea) {

0 commit comments

Comments
 (0)