Skip to content

Commit

Permalink
Updated documentation to reflect new exit code behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
msfterictraut committed May 17, 2019
1 parent 78d1a71 commit 87030c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/command-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Pyright can be run as either a VS Code extension or as a node-based command-line

| Exit Code | Meaning |
| :---------- | :--------------------------------------------------------------- |
| 0 | No errors or warnings reported |
| 1 | One or more errors or warnings reported |
| 0 | No errors reported |
| 1 | One or more errors reported |
| 2 | Fatal error occurred with no errors or warnings reported |

8 changes: 4 additions & 4 deletions server/src/pyright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import { combinePaths, normalizePath } from './common/pathUtils';
const toolName = 'pyright';

enum ExitStatus {
Success = 0,
DiagnosticsReported = 1,
NoErrors = 0,
ErrorsReported = 1,
FatalError = 2
}

Expand Down Expand Up @@ -127,8 +127,8 @@ function processArgs() {
if (!watch) {
process.exit(
errorCount > 0 ?
ExitStatus.DiagnosticsReported :
ExitStatus.Success);
ExitStatus.ErrorsReported :
ExitStatus.NoErrors);
}
});

Expand Down

0 comments on commit 87030c7

Please sign in to comment.