Merge pull request #178 from henninghall/patch-1

exit build with error if `getPackageJson` fails
This commit is contained in:
Phil 2022-09-07 11:15:46 +02:00 committed by GitHub
commit ee34ef3f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -11,9 +11,9 @@ if (process.env.PACKAGEJSON_DIR) {
} }
const workspace = process.env.GITHUB_WORKSPACE; const workspace = process.env.GITHUB_WORKSPACE;
const pkg = getPackageJson();
(async () => { (async () => {
const pkg = getPackageJson();
const event = process.env.GITHUB_EVENT_PATH ? require(process.env.GITHUB_EVENT_PATH) : {}; const event = process.env.GITHUB_EVENT_PATH ? require(process.env.GITHUB_EVENT_PATH) : {};
if (!event.commits && !process.env['INPUT_VERSION-TYPE']) { if (!event.commits && !process.env['INPUT_VERSION-TYPE']) {