Skip to content

feat(global-cli): add vp implode command to completely uninstall vite-plus#761

Merged
fengmk2 merged 9 commits intomainfrom
vp-global-cli-uninstall
Mar 10, 2026
Merged

feat(global-cli): add vp implode command to completely uninstall vite-plus#761
fengmk2 merged 9 commits intomainfrom
vp-global-cli-uninstall

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Mar 10, 2026

Implements a self-uninstall command that:

  • Removes ~/.vite-plus/ directory
  • Cleans shell profiles (.zshenv, .zshrc, .bashrc, .bash_profile,
    .profile, config.fish) by removing Vite+ sourcing lines
  • On Windows, removes .vite-plus\bin from User PATH and handles
    locked binary via deferred cmd.exe deletion
  • Requires typing "uninstall" to confirm (or --yes/-y to skip)

Adds CI verification in test-standalone-install.yml for all platforms
(Unix + Windows) that tests implode followed by reinstall.

closes VP-236

image.png

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 10, 2026

Deploy Preview for viteplus-staging canceled.

Name Link
🔨 Latest commit 51f3988
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-staging/deploys/69b025630b6e2c00089d5257

@fengmk2 fengmk2 self-assigned this Mar 10, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 force-pushed the vp-global-cli-uninstall branch from 77d4a69 to eb037bb Compare March 10, 2026 07:48
Comment thread .github/workflows/test-standalone-install.yml Outdated
@linear
Copy link
Copy Markdown

linear Bot commented Mar 10, 2026

VP-236 P0: Implement automatic uninstall for Vite+ (follow-up)

Problem

  • We currently do not support the automatic uninstall feature (per MK note in thread).

Task

  • Implement automatic uninstall behavior.
  • Define expected UX (when it triggers, what it removes, safety confirmations, docs).

Context

  • Follow-up requested after discussion: "Indeed, you reminded me that we haven't supported the automatic uninstall feature yet. I will add it as soon as possible."

@fengmk2 fengmk2 marked this pull request as ready for review March 10, 2026 08:20
Comment thread .github/workflows/test-standalone-install.yml Outdated
Comment thread crates/vite_global_cli/src/commands/implode.rs Outdated
@fengmk2 fengmk2 force-pushed the vp-global-cli-uninstall branch from f92f5ec to ddc454e Compare March 10, 2026 11:34
@fengmk2 fengmk2 force-pushed the vp-global-cli-uninstall branch from 19d489a to 03afb24 Compare March 10, 2026 13:17
@fengmk2 fengmk2 force-pushed the vp-global-cli-uninstall branch 2 times, most recently from 2518891 to 5520b3b Compare March 10, 2026 13:55
fengmk2 added 9 commits March 10, 2026 14:06
Also remove implode.rs from CI paths trigger.
- Log remove_dir_all error on Windows fallback path for debugging
- Print cmd.exe command and show its stdout/stderr output
- Rename directory before scheduled delete to avoid racing with reinstall
- Add unit tests for remove_vite_plus_dir (success + nonexistent)
…indows deferred deletion

Extract `build_deferred_delete_script()` and `spawn_deferred_delete()` helpers
for robustness. Move implode tests from test-standalone-install.yml to ci.yml
alongside the existing upgrade tests.
…o rename + deferred delete

The running vp binary is always locked, so remove_dir_all always fails
with "Access is denied" — skip it and rename immediately.
@fengmk2 fengmk2 force-pushed the vp-global-cli-uninstall branch from 5520b3b to 51f3988 Compare March 10, 2026 14:06
Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

Merge activity

  • Mar 10, 2:06 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 10, 2:25 PM UTC: @fengmk2 merged this pull request with Graphite.

@fengmk2 fengmk2 merged commit 1333406 into main Mar 10, 2026
22 checks passed
@fengmk2 fengmk2 deleted the vp-global-cli-uninstall branch March 10, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants