Skip to content

fix: get vite_plus_home from node wrapper's path#1185

Open
liangmiQwQ wants to merge 7 commits intovoidzero-dev:mainfrom
liangmiQwQ:fix/find-node-with-wrappers-path
Open

fix: get vite_plus_home from node wrapper's path#1185
liangmiQwQ wants to merge 7 commits intovoidzero-dev:mainfrom
liangmiQwQ:fix/find-node-with-wrappers-path

Conversation

@liangmiQwQ
Copy link
Copy Markdown
Contributor

Close #1184

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 28, 2026

Deploy Preview for viteplus-preview canceled.

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

@liangmiQwQ
Copy link
Copy Markdown
Contributor Author

Done!

This PR used which crate to find vp's executable file and it's grandparent directory is expected to be vite_plus_home.

The reason not to use std::env::current_exe() is that node is essentially a symlink, and this function would get vp binary file's path. It makes both tests and debugs harder and less stable than a certain path in $PATH var. ($HOME reading logic is also kept if the node is not controlled by vp)

As which crate is also used in vite_command crate, so there is no cost for new dependencies.

Thanks!

@liangmiQwQ liangmiQwQ marked this pull request as ready for review March 29, 2026 00:15
@liangmiQwQ
Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

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

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.

$HOME env overriding makes Vite+ stuck stuck in an infinite loop, especially for Agents use

1 participant