Skip to content

Commit

Permalink
intercept and improve terminal launch error message (#135420)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge committed Oct 19, 2021
1 parent a535b04 commit c72b5c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
break;
}
this._exitCode = exitCodeOrError.code;
if (exitCodeOrError.message.match(/.*error code:\s*\d{3}.*$/)) {
exitCodeOrError.message = `Invalid starting directory ${this.initialCwd}, review your terminal.integrated.cwd setting.`;
}
exitCodeMessage = nls.localize('launchFailed.errorMessage', "The terminal process failed to launch: {0}.", exitCodeOrError.message);
break;
}
Expand Down

0 comments on commit c72b5c4

Please sign in to comment.