respect waitOnExit behavior (#224953)

check waitOnExit #224418
This commit is contained in:
Megan Rogge
2024-08-07 05:49:59 -07:00
committed by GitHub
parent 4b4cf77ff4
commit 3cb5a84125
@@ -1160,7 +1160,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
override dispose(reason?: TerminalExitReason): void {
if (this.shellLaunchConfig.type === 'Task' && reason === TerminalExitReason.Process && this._exitCode !== 0) {
if (this.shellLaunchConfig.type === 'Task' && reason === TerminalExitReason.Process && this._exitCode !== 0 && !this.shellLaunchConfig.waitOnExit) {
return;
}
if (this.isDisposed) {