Skip to content

Use 'default' alias if there are multiple aliases#7804

Merged
joehan merged 4 commits intomasterfrom
jh-default
Oct 7, 2024
Merged

Use 'default' alias if there are multiple aliases#7804
joehan merged 4 commits intomasterfrom
jh-default

Conversation

@joehan
Copy link
Copy Markdown
Member

@joehan joehan commented Oct 7, 2024

Description

Fixes a weird quirk of project selection behavior where we only respected the 'default' alias if there were no other aliases

Scenarios Tested

Ran a command with 2 aliases in my rc, and confirmed that it correctly used 'default'

@joehan joehan requested a review from fredzqm October 7, 2024 23:20
Comment thread src/command.ts

const aliases = rc.projects;
const rcProject = get(aliases, options.project);
const rcProject = options.project ? aliases[options.project] : undefined;
Copy link
Copy Markdown
Contributor

@fredzqm fredzqm Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does rcProject stands for?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably be something like 'resolvedProject' instead - basically, .firebase rc has a map of alias -> project name, and this is using that map to resolve the user provided alias to a real project id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants