diff --git a/lib/plugin/Plugin.js b/lib/plugin/Plugin.js index 77390997..4fb667ae 100644 --- a/lib/plugin/Plugin.js +++ b/lib/plugin/Plugin.js @@ -65,7 +65,8 @@ class Plugin { step(options) { const context = Object.assign({}, this.config.getContext(), { [this.namespace]: this.getContext() }); const opts = Object.assign({}, options, { context }); - return this.config.isCI ? this.spinner.show(opts) : this.showPrompt(opts); + const isException = this.config.isPromptOnlyVersion && ['incrementList', 'publish', 'otp'].includes(opts.prompt); + return this.config.isCI && !isException ? this.spinner.show(opts) : this.showPrompt(opts); } } diff --git a/lib/plugin/npm/npm.js b/lib/plugin/npm/npm.js index 8765b473..c7c5d887 100644 --- a/lib/plugin/npm/npm.js +++ b/lib/plugin/npm/npm.js @@ -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' }); }