Skip to content

Commit

Permalink
Exit gracefully instead of calling process.exit
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
  • Loading branch information
t1m0thyj committed May 22, 2023
1 parent c45e1ea commit f1700ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/run-script.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/core/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ async function run(): Promise<void> {
const context = await utils.buildContext();
if (context == null) {
core.info("Current branch is not a release branch, exiting now");
process.exit();
return;
} else if (Inputs.ciSkip && (await utils.getLastCommitMessage(context))?.includes("[ci skip]")) {
core.info("Commit message contains CI skip phrase, exiting now");
process.exit();
return;
}

const pluginsLoaded = await utils.loadPlugins(context);
Expand Down
2 changes: 1 addition & 1 deletion packages/run-script/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function run(): Promise<void> {
});
if (context == null) {
core.info("Current branch is not targeting a release branch, exiting now");
process.exit();
return;
}

await loadScript(scriptName)(context);
Expand Down

0 comments on commit f1700ea

Please sign in to comment.