feat: clean up distrobox exports/entries even if container is already deleted#2062
feat: clean up distrobox exports/entries even if container is already deleted#2062iTrooz wants to merge 6 commits into
Conversation
|
I also added a failsafe on cleanup() because I accidentally triggered it with an empty container name during tests, and ended up deleting a lot of other files on my computer. Tell me if you'd prefer me to remove it :) |
db0ba66 to
a48ad88
Compare
There was a problem hiding this comment.
Pull request overview
Adds behavior to distrobox rm to also clean up exported binaries/desktop entries for explicitly requested containers even when the container no longer exists, aligning with the “Remove exported apps” workflow discussed in #2059.
Changes:
- Track explicitly requested container names that were not found/removed and run cleanup for them.
- Add a small slice helper to remove handled names from the explicit list.
- Add a guard in
cleanup()for empty container names.
Comments suppressed due to low confidence (1)
pkg/commands/rm.go:88
- This fmt.Printf call lacks a trailing newline, which can make output from multiple deletions run together and be harder to read. Consider adding "\n" (and/or routing through the logger once available).
//nolint:forbidigo // waiting for the logger implementation
fmt.Printf("error deleting %s: %s", currentDistrobox.Name, err)
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hello ! Any news ? Changes I need to make ? |
|
Hi, Right now, we are focusing on making Distrobox v2 stable, which means having feature parity with Distrobox v1. That implies that, for the moment, we are not considering new features or bug fixes besides those that are trivial to merge and do not require much brain power from us. On this PR, we are not convinced by the implementation, but at the same time, we cannot give you the level of feedback you deserve. Let's postpone this contribution until Distrobox v2 is stable. Closing for now. |
|
Would you mind reopening & drafting this PR instead, so it's still on my feed and I remember to come back to it later ? Thanks |
See #2060