-
Notifications
You must be signed in to change notification settings - Fork 902
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
Command "firebase emulators:export ." deleted all my files without any warning #3962
Comments
Hmm, thanks for raising this, the CLI should really prompt you if you're attempting to export to a directory which already has files in it. We'll put this as a feature request. |
@abeisgoat the CLI does prompt you if the path does not contain a symbolic link. |
OMG I can't believe I'm not the only person... |
It's a really nasty bug. Not sure why @abeisgoat added a feature request label 😃 |
Just to add a bit of context, we've fixed the most common and dangerous case of wiping your project directory in #4127 so please update to the latest CLI version. However, the detection is imperfect that it doesn't handle symlinks, which we can tackle next (as @gitslav suggested). There's also a possibility for one to specify some other directory that is not within the project but contains other files, which we're still trying to figure out the best behavior. Prompting is a good idea, but it may break many test scripts and use cases that overwrites previous exports. Besides, it doesn't really work with |
Lost half of all progress because of this bug... please fix, or atleast add warning in documentation |
Closing this out since we have #3092 as the proper place for discussion |
[REQUIRED] Environment info
firebase-tools: 9.19.0
Platform: macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
[REQUIRED] Actual behavior
Edit:
After trying to reproduce the issue I found that I used a symlink while navigating to the final directory.
firebase-tools/src/emulator/controller.ts
Line 749 in 3d5b8cd
This does not resolve/respect symlinks and is probably where the issue starts from.
The text was updated successfully, but these errors were encountered: