Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix login:use and account resolution issue #3773

Merged
merged 2 commits into from Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1 +1,2 @@
- `ext:dev:publish` and `ext:update` now support --force and --non-interactive flags.
- Fixes issue where account specified by `login:use` was not being correctly loaded (#3759).
4 changes: 3 additions & 1 deletion src/command.ts
Expand Up @@ -260,14 +260,16 @@ export class Command {
const account = getInheritedOption(options, "account");
options.account = account;

// selectAccount needs the projectRoot to be set.
options.projectRoot = detectProjectRoot(options);

const projectRoot = options.projectRoot;
const activeAccount = selectAccount(account, projectRoot);

if (activeAccount) {
setActiveAccount(options, activeAccount);
}

options.projectRoot = detectProjectRoot(options);
this.applyRC(options);
if (options.project) {
await this.resolveProjectIdentifiers(options);
Expand Down