Skip to content

Commit ce58d8f

Browse files
committed
fix(publish): Allow --no-verify-access to prevent checking for account-level 2FA
1 parent a3d264e commit ce58d8f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

commands/publish/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -452,14 +452,14 @@ class PublishCommand extends Command {
452452
return verifyNpmPackageAccess(this.packagesToPublish, username, this.conf.snapshot);
453453
}
454454
});
455-
}
456455

457-
// read profile metadata to determine if account-level 2FA is enabled
458-
chain = chain.then(() => getTwoFactorAuthRequired(this.conf.snapshot));
459-
chain = chain.then(isRequired => {
460-
// notably, this still doesn't handle package-level 2FA requirements
461-
this.twoFactorAuthRequired = isRequired;
462-
});
456+
// read profile metadata to determine if account-level 2FA is enabled
457+
chain = chain.then(() => getTwoFactorAuthRequired(this.conf.snapshot));
458+
chain = chain.then(isRequired => {
459+
// notably, this still doesn't handle package-level 2FA requirements
460+
this.twoFactorAuthRequired = isRequired;
461+
});
462+
}
463463

464464
return chain;
465465
}

0 commit comments

Comments
 (0)