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

bugfix(cmd-use-clear) Removed automatic use of aliased firebase project #781

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hlshen
Copy link
Contributor

@hlshen hlshen commented May 23, 2018

@Memeriaj

Description

Before every command, applyRc runs. In applyRc, there exists a conditional check:

else if (!options.project && _.size(aliases) === 1) {
    options.projectAlias = _.head(_.keys(aliases));
    options.project = _.head(_.values(aliases));
  }

If there is no active project and there exists exactly one project with an alias, when running a command, the one project with an alias will be used.

This leads to some confusing logic. When a user runs firebase use --clear, they expect the active project to be cleared, but the current logic will lead to a false sense that the active project was never cleared.

Scenarios Tested

Scenarios:

  1. User is using the one aliased project as the active project

    User runs firebase use --clear. User runs firebase use. The same *one aliased project shows up as the active project.

  2. User has one aliased project and clears the active project

    Running a command will automatically use the one aliased project
    Running firebase use will show the one aliased project as the active project

  3. When user has more than one aliased project, and clears the active project

    Running a command will see a "No Active Project" error message.
    Running firebase use will show that there is no active project.

@hlshen hlshen requested a review from mbleigh May 23, 2018 23:16
@samtstern
Copy link
Contributor

@mbleigh do you think this is still work pursuing>

@google-cla google-cla bot added the cla: yes Manual indication that this has passed CLA. label Nov 10, 2021
joehan pushed a commit that referenced this pull request Apr 26, 2024
Adding ternary to download correct FireMAT emulator binary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manual indication that this has passed CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants