Skip to content

fix(global): respect custom VP_HOME#2029

Open
liangmiQwQ wants to merge 21 commits into
voidzero-dev:mainfrom
liangmiQwQ:fix/custom-vp-home-broken
Open

fix(global): respect custom VP_HOME#2029
liangmiQwQ wants to merge 21 commits into
voidzero-dev:mainfrom
liangmiQwQ:fix/custom-vp-home-broken

Conversation

@liangmiQwQ

@liangmiQwQ liangmiQwQ commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

At present, Vite+ allows users to specific VP_HOME as an installation directory. However, for any future vp runs without manual VP_HOME environment, we still use default ~/.vite-plus or vp's grandparent directory if its name is .vite-plus (It's related to #1185 by me).

It will cause mess, like multiple Vite+ instances, vp binary not finding, packages unusable and a lot of unexpected behavior.

This PR improves all related logic, include:

  • Set VP_HOME in env files
  • Improve prompt and implode check related to VP_HOME
  • Respect VP_HOME in pnpm boostrap-cli at devtime.

The new install.sh prompt looks like that:
image

🤖 Generated by Codex

@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 40bb28b
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a48c6ccc89f380008fb9fd0

@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 410a38e18e

ℹ️ 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".

Comment thread crates/vite_global_cli/src/commands/env/setup.rs Outdated
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 7e3e24e536

ℹ️ 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".

@liangmiQwQ liangmiQwQ marked this pull request as ready for review July 3, 2026 05:52
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@fengmk2 Worth mentioning: after this change, Vite+ will start injecting VP_HOME in shellrc, just like Volta. (VOLTA_HOME). It may also help to check whether Vite+ is installed for other tools :)

@fengmk2

fengmk2 commented Jul 3, 2026

Copy link
Copy Markdown
Member

@fengmk2 Worth mentioning: after this change, Vite+ will start injecting VP_HOME in shellrc, just like Volta. (VOLTA_HOME). It may also help to check whether Vite+ is installed for other tools :)

Good news, maybe after your pr merge, my one can be closed #1958 😄

@fengmk2 fengmk2 requested review from naokihaba and nekomoyi July 3, 2026 06:01
@fengmk2

fengmk2 commented Jul 3, 2026

Copy link
Copy Markdown
Member

@nekomoyi @naokihaba I need your help to see if this added environment variable will have any side effects.

@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

Good news, maybe after your pr merge, my one can be closed #1958 😄

Oh? I haven't seen it, I would take a look at it later.

@fengmk2

fengmk2 commented Jul 3, 2026

Copy link
Copy Markdown
Member

If I have previously installed vite-plus, and this time I reinstall it and set VP_HOME to a new directory, should we prompt the user whether they need to remove the previous ~/.vite-plus directory?

@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests test: sfw labels Jul 3, 2026
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

should we prompt the user whether they need to remove the previous ~/.vite-plus directory?

I think that makes sense, and I've implemented in 43f7d23

@fengmk2

fengmk2 commented Jul 3, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd7532a4e1

ℹ️ 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".

Comment thread packages/cli/install.sh Outdated
Comment thread packages/cli/install.sh Outdated
Comment thread crates/vite_global_cli/src/commands/implode.rs Outdated
@liangmiQwQ liangmiQwQ marked this pull request as draft July 3, 2026 13:39
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 426e1cfdfa

ℹ️ 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".

Comment thread packages/cli/install.sh Outdated
Comment thread packages/cli/install.sh
Comment thread crates/vite_shared/src/home.rs
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 003cc49858

ℹ️ 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".

Comment thread crates/vite_shared/src/home.rs Outdated
Comment thread packages/cli/install.sh
Comment thread packages/cli/install.sh
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 40bb28be7d

ℹ️ 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".

@liangmiQwQ liangmiQwQ marked this pull request as ready for review July 4, 2026 08:53
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

This PR lets me run vp implode for the first time lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: sfw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants