Updated documentation to reflect new exit code behavior.

This commit is contained in:
Eric Traut 2019-05-16 20:28:04 -07:00
parent 78d1a7176f
commit 87030c7a06
2 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@ Pyright can be run as either a VS Code extension or as a node-based command-line
| Exit Code | Meaning | | Exit Code | Meaning |
| :---------- | :--------------------------------------------------------------- | | :---------- | :--------------------------------------------------------------- |
| 0 | No errors or warnings reported | | 0 | No errors reported |
| 1 | One or more errors or warnings reported | | 1 | One or more errors reported |
| 2 | Fatal error occurred with no errors or warnings reported | | 2 | Fatal error occurred with no errors or warnings reported |

View File

@ -25,8 +25,8 @@ import { combinePaths, normalizePath } from './common/pathUtils';
const toolName = 'pyright'; const toolName = 'pyright';
enum ExitStatus { enum ExitStatus {
Success = 0, NoErrors = 0,
DiagnosticsReported = 1, ErrorsReported = 1,
FatalError = 2 FatalError = 2
} }
@ -127,8 +127,8 @@ function processArgs() {
if (!watch) { if (!watch) {
process.exit( process.exit(
errorCount > 0 ? errorCount > 0 ?
ExitStatus.DiagnosticsReported : ExitStatus.ErrorsReported :
ExitStatus.Success); ExitStatus.NoErrors);
} }
}); });