We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
npm dist-tag add
1 parent 00c8feb commit ec98e77Copy full SHA for ec98e77
lib/npm.js
@@ -98,7 +98,13 @@ module.exports = function( Release ) {
98
Release.exec( npmPublish );
99
100
while ( npmTags.length ) {
101
- npmPublish = "npm dist-tag add " + newVersion + " " + npmTags.pop();
+
102
+ // Ask for OTP before adding each tag as the code may get invalid
103
+ // if the process takes too long.
104
+ otp = await Release._getNpmOtp();
105
+ npmPublish = `npm dist-tag add ${ newVersion } ${ npmTags.pop() } ${
106
+ otp ? `--otp ${ otp }` : ""
107
+ }`;
108
console.log( " " + chalk.cyan( npmPublish ) );
109
if ( !Release.isTest ) {
110
0 commit comments