Implement pv uninstall command#16
Merged
munezaclovis merged 8 commits intomainfrom Mar 5, 2026
Merged
Conversation
Adds a full uninstall command that safely removes all pv data: - Confirmation prompt requiring user to type "uninstall" - Composer auth token backup offer before deletion - Reads registry to track .pv-php files before removing ~/.pv - Stops daemon/foreground processes gracefully - Removes launchd plist - Removes DNS resolver and CA cert (sudo, graceful fallback) - Removes ~/.pv directory - Reports leftover .pv-php files in project directories - Prints shell config cleanup instructions
Runs as Phase 18 after verify-final. Pipes "uninstall" confirmation, then verifies ~/.pv, launchd plist, DNS resolver, and frankenphp processes are all gone.
The sudo command inside uninstall was hanging in CI because stdin was a pipe (already consumed by the confirmation prompt). Now uses sudo -n (non-interactive) first, falling back to interactive sudo only when a TTY is detected.
The security command triggers a macOS keychain dialog that hangs in headless environments. Now runs the resolver removal and cert removal as separate operations, with a 10-second timeout on the cert removal that kills the process if it hangs.
In CI, some files under ~/.pv get root ownership from sudo -E pv start. os.RemoveAll fails on those, so we fall back to sudo -n rm -rf.
- Detect the running binary via os.Executable(), resolve symlinks, and remove it (with sudo fallback for /usr/local/bin) - Updated confirmation prompt to list the pv binary separately - Manual cleanup instructions now include eval "$(pv env)" - E2e test verifies the binary is gone after uninstall
munezaclovis
added a commit
that referenced
this pull request
Mar 25, 2026
- #16 (setup TUI off-by-one): cursor bound is correct, max = len+1 - #19 (StartBackgroundUpdater): IS called from server.Start() - #38 (updateSymlinks divergence): SetGlobal saves before calling, paths always agree - #39 (frankenphp logFile leak): struct only built after Start() succeeds, Process is always non-nil
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.
Summary
pv uninstallcommand that safely and completely removes pv from the system--yesflag).pv-phpfiles and shell config lines the user should clean upImplementation
Follows the 9-task plan:
~/.pv/composer/auth.jsonif it contains tokens~/.pvdeletion~/Library/LaunchAgents/dev.prvious.pv.plistsudoto remove/etc/resolver/{tld}and untrust CA cert (graceful fallback)rm -rfTest plan
go test ./...passes (10 new tests, all existing tests pass)pv install, link a project, thenpv uninstall— verify~/.pvis gone~/pv-auth-backup.jsoncorrectly