From 3004de4b400cbd1ed756ab21b4d41062dcf3e23f Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Tue, 6 Aug 2019 09:12:30 -0400 Subject: [PATCH] Remove neutral exit code references --- packages/core/README.md | 9 ++------- packages/core/src/core.ts | 14 +------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/packages/core/README.md b/packages/core/README.md index dd5d479b..8d8c00f1 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -43,18 +43,13 @@ core.addPath('pathToTool'); #### Exit codes -You should use this library to set the exit code for your action: +You should use this library to set the failing exit code for your action: ``` const core = require('@actions/core'); try { - if (work to do) { - // Do work - } else { - // Set neutral indicates that the action terminated but did not fail (aka there was no work to be done) - core.setNeutral(); - } + // Do stuff } catch (err) { // setFailed logs the message and sets a failing exit code diff --git a/packages/core/src/core.ts b/packages/core/src/core.ts index cf67d9e2..64ec017f 100644 --- a/packages/core/src/core.ts +++ b/packages/core/src/core.ts @@ -22,12 +22,7 @@ export enum ExitCode { /** * A code indicating that the action was a failure */ - Failure = 1, - - /** - * A code indicating that the action is complete, but neither succeeded nor failed - */ - Neutral = 78 + Failure = 1 } //----------------------------------------------------------------------- @@ -94,13 +89,6 @@ export function setOutput(name: string, value: string): void { // Results //----------------------------------------------------------------------- -/** - * Sets the action status to neutral - */ -export function setNeutral(): void { - process.exitCode = ExitCode.Neutral -} - /** * Sets the action status to failed. * When the action exits it will be with an exit code of 1