Skip to content

Commit

Permalink
Prompt for npm OTP in --only-version (fixes #948)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Dec 2, 2022
1 parent 331b0de commit 594c05d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugin/npm/npm.js
Expand Up @@ -92,7 +92,8 @@ class npm extends Plugin {
release() {
if (this.options.publish === false) return false;
const publish = () => this.publish({ otpCallback });
const otpCallback = this.config.isCI ? null : task => this.step({ prompt: 'otp', task });
const otpCallback =
this.config.isCI && !this.config.isPromptOnlyVersion ? null : task => this.step({ prompt: 'otp', task });
return this.step({ task: publish, label: 'npm publish', prompt: 'publish' });
}

Expand Down

0 comments on commit 594c05d

Please sign in to comment.