Skip to content

firestore:delete should notify the user of the current project #3456

Closed

Description

@davidbrenner

[REQUIRED] Environment info

 % firebase --version
9.11.0

firebase-tools:

Platform: linux

[REQUIRED] Test case

% firebase firestore:delete -r users  
? You are about to delete all documents in the collection at users and all of their subcollections. Are you sure? (y/N)

[REQUIRED] Steps to reproduce

% firebase firestore:delete -r users  
? You are about to delete all documents in the collection at users and all of their subcollections. Are you sure? (y/N)

[REQUIRED] Expected behavior

firestore:delete should tell the user in the confirmation the project from which they are deleting documents. This was specifically problematic for me when I used the command on Google Cloud Console's Shell. The shell prints the current gcloud project, but firebase-tools ignores that. A simple confirmation message would have saved me a lot of headache. I put together a PR that I will be submitting momentarily that includes my proposed fix:

% firebase firestore:delete -r users  
? You are about to delete all documents in the collection at users and all of their subcollections for **project-name**. Are you sure? (y/N)

[REQUIRED] Actual behavior

% firebase firestore:delete -r users  
? You are about to delete all documents in the collection at users and all of their subcollections. Are you sure? (y/N)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions