File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/terminal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -966,7 +966,11 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
966966 // Create exit code message
967967 switch ( typeof exitCodeOrError ) {
968968 case 'number' :
969+ // Only show the error if the exit code is non-zero
969970 this . _exitCode = exitCodeOrError ;
971+ if ( this . _exitCode === 0 ) {
972+ break ;
973+ }
970974
971975 let commandLine : string | undefined = undefined ;
972976 if ( this . _shellLaunchConfig . executable ) {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
7878 const results = await Promise . all ( [ this . _validateCwd ( ) , this . _validateExecutable ( ) ] ) ;
7979 const firstError = results . find ( r => r !== undefined ) ;
8080 if ( firstError ) {
81- // TODO: Anything else we need to do here?
81+ // TODO: Anything else we need to do here to tear down the terminal instance ?
8282 // this._processStartupComplete = Promise.resolve(undefined);
8383 // this._onProcessExit.fire(0);
8484
@@ -89,10 +89,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
8989 this . setupPtyProcess ( this . _shellLaunchConfig , this . _ptyOptions ) ;
9090 return undefined ;
9191 } catch ( err ) {
92-
93- // TODO: Anything else we need to do here?
94-
95- // TODO: Extract code and message from the native exception, currently they're combined
92+ // TODO: Anything else we need to do here to tear down the terminal instance?
9693 // A native exception occurred
9794 this . _logService . trace ( 'IPty#spawn native exception' , err ) ;
9895 return { message : `A native exception occurred during launch (${ err . message } )` } ;
You can’t perform that action at this time.
0 commit comments