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

emulators:export doesn't check if the target folder is empty... #6313

Closed
real-marshal opened this issue Aug 31, 2023 · 1 comment · Fixed by #6357
Closed

emulators:export doesn't check if the target folder is empty... #6313

real-marshal opened this issue Aug 31, 2023 · 1 comment · Fixed by #6357

Comments

@real-marshal
Copy link

[REQUIRED] Environment info

firebase-tools: 12.4.6

Platform: Fedora

[REQUIRED] Test case

If you run firebase emulators:export ., your working directory will be rimraf'd.

[REQUIRED] Steps to reproduce

Run firebase emulators:export .

[REQUIRED] Expected behavior

The command makes sure the path is empty and warns of deleting everything there. I see there's a --force flag, which I guess should prevent this check, but I didn't use it, yet still got this insane result.

[REQUIRED] Actual behavior

Everything just disappears, all the code you haven't pushed yet gets completely obliterated...

@aalej
Copy link
Contributor

aalej commented Sep 1, 2023

Hi @real-marshal, sorry to hear that you encountered this issue and thanks for reporting this to us. I was able to reproduce the behavior you mentioned, and I agree that this should be improved to prevent the deletion of everything under the specified path especially if it contains your entire codebase.

I’ll notify our team about this so that they can take a look, and I’ll be marking this issue as reproducible.

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

Successfully merging a pull request may close this issue.

2 participants