Skip to content

Commit 70bcfa0

Browse files
committed
Fix incorrect relaunch when exit code is 0
Part of microsoft#154421
1 parent b04a230 commit 70bcfa0

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
@@ -1703,7 +1703,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
17031703

17041704
const parsedExitResult = parseExitResult(exitCodeOrError, this.shellLaunchConfig, this._processManager.processState, this._initialCwd);
17051705

1706-
if (this._usedShellIntegrationInjection && (this._processManager.processState === ProcessState.KilledDuringLaunch || this._processManager.processState === ProcessState.KilledByProcess)) {
1706+
if (this._usedShellIntegrationInjection && (this._processManager.processState === ProcessState.KilledDuringLaunch || this._processManager.processState === ProcessState.KilledByProcess) && parsedExitResult?.code !== 0) {
17071707
this._relaunchWithShellIntegrationDisabled(parsedExitResult?.message);
17081708
this._onExit.fire(exitCodeOrError);
17091709
return;

0 commit comments

Comments
 (0)