Skip to content

Commit a8981db

Browse files
committed
fix: avoid multiple verifyConditions invocation
closes #414
1 parent 7c55636 commit a8981db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ let prepared;
1414
const npmrc = tempy.file({name: '.npmrc'});
1515

1616
async function verifyConditions(pluginConfig, context) {
17+
if (verified) {
18+
return;
19+
}
20+
1721
// If the npm publish plugin is used and has `npmPublish`, `tarballDir` or `pkgRoot` configured, validate them now in order to prevent any release if the configuration is wrong
1822
if (context.options.publish) {
1923
const publishPlugin =
@@ -39,7 +43,7 @@ async function verifyConditions(pluginConfig, context) {
3943
errors.push(...error);
4044
}
4145

42-
if (errors.length > 0) {
46+
if (errors.length > 0 && !verified) {
4347
throw new AggregateError(errors);
4448
}
4549

0 commit comments

Comments
 (0)