Repository navigation
fix(appstore): uninstall . no longer removes every installed app - #488
Merged
Merged
Conversation
`pilotctl appstore uninstall . --yes` resolved "." to the install root itself: resolveUnder only checks containment, and the root contains itself. The whole root was removed, and since #473 every app's leftover processes were stopped too. App ids are single directory names, so uninstall, caps and the next-steps loaders now go through resolveAppDir, which rejects ".", ".." and anything with a path separator before the containment check. install keeps resolveUnder: its argument may be a bundle directory. Also drop two references to the removed managed-fleet reconcile from the rename comments added in #473, and name the release in the catalogue README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
pilotctl appstore uninstall . --yesresolved.to the install root itself.resolveUnderonly checks containment, and the root contains itself, so the whole root was removed. Since #473 it also stopped every app's leftover processes. Found during review of #473; the removal itself predates it.The fix
App ids are single directory names.
uninstall,capsand the two next-steps loaders now resolve throughresolveAppDir, which rejects.,..and anything containing a path separator before the containment check.installkeepsresolveUnder, because its argument may be a bundle directory.Test
TestCLIAppStoreUninstallRejectsRootAndNestedIDsrunsuninstall <id> --yesfor.,..,victim/..anda/bagainst a root with two apps and checks both survive. Without the fix it fails:uninstall "." --yes succeededand both app directories are gone.go test ./cmd/pilotctl/passes.Also
Two comments added in #473 cited the managed-fleet reconcile, which #485 removed; reworded. The catalogue README now names v1.14.1 as the release that knows
renamed_to/hidden.🤖 Generated with Claude Code