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

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

Merged
merged 4 commits into from
Oct 7, 2024
Merged

Conversation

joehan
Copy link
Contributor

@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
// support deprecated "firebase" key in firebase.json
if (options.config && !options.project) {
options.project = options.config.defaults.project;
}

const aliases = rc.projects;
const rcProject = get(aliases, options.project);
const rcProject = options.project ? aliases[options.project] : undefined;
Copy link
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
Contributor 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