Merge pull request #236736 from microsoft/tyriar/236670

Explain exitCode undefined in more detail
pull/236749/head
Daniel Imms 2024-12-20 10:25:41 -08:00 committed by GitHub
commit 131ee0ef66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 4 deletions

View File

@ -7724,10 +7724,17 @@ declare module 'vscode' {
/**
* The exit code reported by the shell.
*
* Note that `undefined` means the shell either did not report an exit code (ie. the shell
* integration script is misbehaving) or the shell reported a command started before the command
* finished (eg. a sub-shell was opened). Generally this should not happen, depending on the use
* case, it may be best to treat this as a failure.
* When this is `undefined` it can mean several things:
*
* - The shell either did not report an exit code (ie. the shell integration script is
* misbehaving)
* - The shell reported a command started before the command finished (eg. a sub-shell was
* opened).
* - The user canceled the command via ctrl+c.
* - The user pressed enter when there was no input.
*
* Generally this should not happen. Depending on the use case, it may be best to treat this
* as a failure.
*
* @example
* const execution = shellIntegration.executeCommand({