From 87030c7a060ce2e7c55ae2e0be45b1eebd822a74 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Thu, 16 May 2019 20:28:04 -0700 Subject: [PATCH] Updated documentation to reflect new exit code behavior. --- docs/command-line.md | 4 ++-- server/src/pyright.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/command-line.md b/docs/command-line.md index ec1a125362da..d9e5a70a1a0a 100644 --- a/docs/command-line.md +++ b/docs/command-line.md @@ -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 | diff --git a/server/src/pyright.ts b/server/src/pyright.ts index 43932918efc1..bbb33c3ff4ca 100644 --- a/server/src/pyright.ts +++ b/server/src/pyright.ts @@ -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 } @@ -127,8 +127,8 @@ function processArgs() { if (!watch) { process.exit( errorCount > 0 ? - ExitStatus.DiagnosticsReported : - ExitStatus.Success); + ExitStatus.ErrorsReported : + ExitStatus.NoErrors); } });