Skip to content

Commit

Permalink
fix: should skip registry checking if npmPublish is false
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeents committed Mar 30, 2023
1 parent 01d5b7e commit bef220d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ export async function verifyConditions(

ctx.logger.log(`read ${ctx.cwd}/package.json`);
const packageJson = await getPackage(ctx.cwd);
const registryFromPackage = packageJson?.publishConfig?.registry as string;

if (config.npmPublish === false) {
ctx.logger.log('skipping registry configuration since npmPublish is false');
return;
}

const registryFromPackage = packageJson?.publishConfig?.registry as string;
let yarnrc: Record<string, string> = {};
let registryFromYarnrc = '';

Expand All @@ -42,11 +47,6 @@ export async function verifyConditions(
return;
}

if (config.npmPublish === false) {
ctx.logger.log('skipping since npmPublish is false');
return;
}

if (config.useNpmToken == config.useNpmAuthIdent) {
ctx.logger.log('useNpmToken cannot be same value as useNpmAuthIdent');
return;
Expand Down

0 comments on commit bef220d

Please sign in to comment.