Skip to content

Commit

Permalink
fix(publish): OTP cache should be seeded from conf value, not CLI dir…
Browse files Browse the repository at this point in the history
…ectly
  • Loading branch information
evocateur committed Jul 16, 2019
1 parent 2fa02a8 commit cf56622
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/publish/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ class PublishCommand extends Command {
this.logger.verbose("session", npmSession);
this.logger.verbose("user-agent", userAgent);

// cache to hold a one-time-password across publishes
this.otpCache = { otp: this.options.otp };

this.conf = npmConf({
lernaCommand: "publish",
npmSession,
Expand All @@ -101,6 +98,9 @@ class PublishCommand extends Command {
registry: this.options.registry,
});

// cache to hold a one-time-password across publishes
this.otpCache = { otp: this.conf.get("otp") };

this.conf.set("user-agent", userAgent, "cli");

if (this.conf.get("registry") === "https://registry.yarnpkg.com") {
Expand Down

0 comments on commit cf56622

Please sign in to comment.