// Prevent dispose functions being triggered multiple times
if(this._isExiting){
return;
}
this._logService.debug(`Terminal process exit (id: ${this.id}) with code ${exitCode}`);
this._logService.debug(`Terminal process exit (id: ${this.id}) with code ${this._exitCode}`);
this._exitCode=exitCode;
this._isExiting=true;
letexitCodeMessage:string|undefined;
// Create exit code message
if(exitCode){
if(exitCode===SHELL_PATH_INVALID_EXIT_CODE){
exitCodeMessage=nls.localize('terminal.integrated.exitedWithInvalidPath','The terminal shell path "{0}" does not exist',this._shellLaunchConfig.executable);
exitCodeMessage=nls.localize('terminal.integrated.exitedWithInvalidPathDirectory','The terminal shell path "{0}" is a directory',this._shellLaunchConfig.executable);
exitCodeMessage=nls.localize('terminal.integrated.exitedWithInvalidCWD','The terminal shell CWD "{0}" does not exist',this._shellLaunchConfig.cwd.toString());
exitCodeMessage=nls.localize('terminal.integrated.legacyConsoleModeError','The terminal failed to launch properly because your system has legacy console mode enabled, uncheck "Use legacy console" cmd.exe\'s properties to fix this.');
exitCodeMessage=nls.localize('terminal.integrated.legacyConsoleModeError','The terminal failed to launch properly because your system has legacy console mode enabled, uncheck "Use legacy console" cmd.exe\'s properties to fix this.');