fix: get vite_plus_home from node wrapper's path#1185
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
|
Done! This PR used The reason not to use As Thanks! |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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: <img width="977" height="270" alt="image" src="https://github.com/user-attachments/assets/c96435d1-4b49-4e51-bb75-3da06205f23e" /> 🤖 Generated by Codex --------- Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
Close #1184