提交 c04cd6ab 编写于 作者: D Daniel Imms

Fix terminal error message on every close

Fixes #18368
上级 2782725d
......@@ -373,12 +373,12 @@ export class TerminalInstance implements ITerminalInstance {
this._isExiting = true;
let exitCodeMessage: string;
if (exitCode !== 0) {
if (exitCode) {
exitCodeMessage = nls.localize('terminal.integrated.exitedWithCode', 'The terminal process terminated with exit code: {0}', exitCode);
}
if (this._shellLaunchConfig.waitOnExit) {
if (exitCode !== 0) {
if (exitCode) {
this._xterm.writeln(exitCodeMessage);
}
this._xterm.writeln(nls.localize('terminal.integrated.waitOnExit', 'Press any key to close the terminal'));
......@@ -389,7 +389,7 @@ export class TerminalInstance implements ITerminalInstance {
});
} else {
this.dispose();
if (exitCode !== 0) {
if (exitCode) {
if (this._isLaunching) {
let args = '';
if (this._shellLaunchConfig.args && this._shellLaunchConfig.args.length) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册