gxpkg incorrect deletes all files in project. #1405
Labels
No labels
UX
active development
backlog
blocker
bootstrap
bounty
bug
dependencies
discussion
documentation
duplicate
enhancement
flaky test
help wanted
invalid
javascript
question
release
tendentious
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mighty-gerbils/gerbil#1405
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
gxpkg-deletes-files.sh
I've attached an example test script to reproduce the error.
Reproduces the bug where 'gerbil pkg install' run from within a project
directory (one that has gerbil.pkg + .gerbil/) can wipe project contents.
Root cause: setup-local-pkg-env! in gerbil/tools/env.ss detects gerbil.pkg
in CWD and sets GERBIL_PATH=./.gerbil. All subsequent gxpkg operations
(clean, build, uninstall) then operate on the local .gerbil/ context.
The pkg-uninstall function runs: rm -rf $GERBIL_PATH/pkg/
and pkg-clean runs build.ss clean, which can cascade into removing
project build artifacts and sometimes source files.
thats a clean operation working as intended.
First I've seen this, so I'm right in the middle.
gerbil pkg installis notgerbil pkg cleanand automagically removing anything not specifically stated without a(Y/n)prompt has cost me tens of thousands. Not gerbil's fault, but still.So, not a bug, but NOT A FEATURE, especially for us stoners. Before any
rmwe should prompt unless a--nopromptor--no-longer-stonedtag is passed. Cool?