Skip to content

Commit

Permalink
fix: skip cli verification when publishPub is false (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeshuaro committed Dec 3, 2023
1 parent cea527b commit fc46428
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/verifyConditions.ts
Expand Up @@ -19,13 +19,12 @@ export const verifyConditions = async (
}

await getGoogleIdentityToken(GOOGLE_SERVICE_ACCOUNT_KEY);
await verifyCommand(cli);
} else {
logger.log(
`Skipping Google service account key verification as publishPub is ${publishPub}`
`Skipping Google service account key and ${cli} CLI verification as publishPub is ${publishPub}`
);
}

await verifyCommand(cli);
};

const verifyCommand = async (command: string) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/verifyConditions.test.ts
Expand Up @@ -48,8 +48,8 @@ describe('verifyConditions', () => {

await verifyConditions(config, context);

expect(execa).toBeCalledWith(cli);
expect(getGoogleIdentityToken).toBeCalledTimes(0);
expect(execa).toBeCalledTimes(0);
});

test('error due to missing environment variable', async () => {
Expand Down

0 comments on commit fc46428

Please sign in to comment.