You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug that matches the one I want to file, without success.
flatpak-builder version
flatpak-builder 1.2.2
Flatpak version
Flatpak 1.12.7
How to reproduce
Start in the source directory of the project you're working on
Try to remember how to run flatpak-builder. Something about --force-clean --user --install or so, I think?
See the --help output mentions that you need to give mandatory DIRECTORY and MANIFEST options.
Perhaps having used Docker a couple of times, try giving . for the DIRECTORY argument.
Expected Behavior
A nice message from flatpak-builder saying "refusing to delete the current directory".
Actual Behavior
flatpak-builder did exactly what I told it to. --force-clean . is pretty clear, no?
So maybe this isn't a bug, but it's a big (and destructive) enough trap that's easy enough to fall into that it ought to be forbidden. Maybe it makes sense to build in the current directory, but I can't imagine any situation in which it's reasonable to delete the current directory. flatpak-builder --force-clean . should refuse to operate.
There's precedent for this: even rm -rf prevents you from shooting yourself in the foot in this particular way:
rm: refusing to remove '.' or '..' directory: skipping '.'
Additional Information
Fortunately, I take automated hourly snapshots of my ~/src. Combined with some git show output that happened to be in the terminal backlog I was able to piece everything back together. This time. 😅
The text was updated successfully, but these errors were encountered:
Checklist
flatpak-builder version
flatpak-builder 1.2.2
Flatpak version
Flatpak 1.12.7
How to reproduce
flatpak-builder
. Something about--force-clean --user --install
or so, I think?--help
output mentions that you need to give mandatoryDIRECTORY
andMANIFEST
options..
for theDIRECTORY
argument.Expected Behavior
A nice message from
flatpak-builder
saying "refusing to delete the current directory".Actual Behavior
flatpak-builder
did exactly what I told it to.--force-clean .
is pretty clear, no?So maybe this isn't a bug, but it's a big (and destructive) enough trap that's easy enough to fall into that it ought to be forbidden. Maybe it makes sense to build in the current directory, but I can't imagine any situation in which it's reasonable to delete the current directory.
flatpak-builder --force-clean .
should refuse to operate.There's precedent for this: even
rm -rf
prevents you from shooting yourself in the foot in this particular way:Additional Information
Fortunately, I take automated hourly snapshots of my
~/src
. Combined with somegit show
output that happened to be in the terminal backlog I was able to piece everything back together. This time. 😅The text was updated successfully, but these errors were encountered: