Skip to content

chore: remove dead global logic for update command#1478

Merged
fengmk2 merged 4 commits intovoidzero-dev:mainfrom
liangmiQwQ:chore/remove-dead-npm-install-g-code
Apr 26, 2026
Merged

chore: remove dead global logic for update command#1478
fengmk2 merged 4 commits intovoidzero-dev:mainfrom
liangmiQwQ:chore/remove-dead-npm-install-g-code

Conversation

@liangmiQwQ
Copy link
Copy Markdown
Contributor

@liangmiQwQ liangmiQwQ commented Apr 25, 2026

There is a part of unreachable code in update.rs. It is used to run npm update -g when running vp update -g.

It was added in #238, the first implementation of vp update. But it became dead code after #524 got merged (the PR which introduces vp env).

The following code in cli.rs makes it unreachable.

// Handle global update via vite-plus managed global install
if global {

This PR clears the logic about it, including related tests

It was found by Claude Code while I was writing #1477.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 25, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit c588d89
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69edeb720a4e4800089cca07

@liangmiQwQ liangmiQwQ marked this pull request as ready for review April 25, 2026 12:48
@liangmiQwQ liangmiQwQ changed the title chore: remove dead npm install -g calls chore: remove dead global logic for update command Apr 25, 2026
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 26, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fengmk2 fengmk2 merged commit bf51bcc into voidzero-dev:main Apr 26, 2026
38 checks passed
@liangmiQwQ liangmiQwQ deleted the chore/remove-dead-npm-install-g-code branch April 26, 2026 12:06
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