exitStatus property

TerminalExitStatus? get exitStatus

The exit status of the terminal, this will be undefined while the terminal is active.

Example: Show a notification with the exit code when the terminal exits with a non-zero exit code.

window.onDidCloseTerminal(t => {
  if (t.exitStatus && t.exitStatus.code) {
  	vscode.window.showInformationMessage(`Exit code: ${t.exitStatus.code}`);
  }
});

Implementation

_i3.TerminalExitStatus? get exitStatus => _i5.getProperty(
      this,
      'exitStatus',
    );