Skip to content

Commit 51acdef

Browse files
committed
Fix incorrect relaunch when exit code is 0
Part of microsoft#154421
1 parent 5731129 commit 51acdef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/terminal/browser/terminalInstance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
16571657

16581658
const parsedExitResult = parseExitResult(exitCodeOrError, this.shellLaunchConfig, this._processManager.processState, this._initialCwd);
16591659

1660-
if (this._usedShellIntegrationInjection && (this._processManager.processState === ProcessState.KilledDuringLaunch || this._processManager.processState === ProcessState.KilledByProcess)) {
1660+
if (this._usedShellIntegrationInjection && (this._processManager.processState === ProcessState.KilledDuringLaunch || this._processManager.processState === ProcessState.KilledByProcess) && parsedExitResult?.code !== 0) {
16611661
this._relaunchWithShellIntegrationDisabled(parsedExitResult?.message);
16621662
this._onExit.fire(exitCodeOrError);
16631663
return;

0 commit comments

Comments
 (0)