-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Describe the bug
install.sh ignores shell config directory settings when writing PATH configuration. It hardcodes default paths instead of respecting the environment variables that each shell uses to customize config locations.
Affected shells and the expected config paths:
- zsh (
ZDOTDIR)$HOME/.zshenv->$ZDOTDIR/.zshenv$HOME/.zshrc->$ZDOTDIR/.zshrc
- fish (
XDG_CONFIG_HOME)$HOME/.config/fish/conf.d/vite-plus.fish->$XDG_CONFIG_HOME/fish/conf.d/vite-plus.fish
Users with custom config directories will have PATH configuration written to the wrong location, and vp may not be available in new shells.
Reproduction
N/A
Steps to reproduce
- Have
ZDOTDIRpersistently set to a custom directory (e.g. via/etc/zsh/zshenv) - Run
curl -fsSL https://vite.plus | bash - PATH configuration is written to
$HOME/.zshenvand$HOME/.zshrcinstead of$ZDOTDIR/.zshenvand$ZDOTDIR/.zshrc - Opening a new shell does not have
vpin PATH (zsh: command not found: vp)
System Info
(This is a bug in `install.sh`, so the system info below is from a working installation where I manually patched the script.)
- `vp env current`
VITE+ - The Unified Toolchain for the Web
Environment:
Version 24.14.0
Source lts
Tool Paths:
node /home/mst-mkt/.vite-plus/js_runtime/node/24.14.0/bin/node
npm /home/mst-mkt/.vite-plus/js_runtime/node/24.14.0/bin/npm
npx /home/mst-mkt/.vite-plus/js_runtime/node/24.14.0/bin/npx
- `vp --version`
VITE+ - The Unified Toolchain for the Web
vp v0.1.11
Local vite-plus:
vite-plus Not found
Tools:
vite Not found
rolldown Not found
vitest Not found
oxfmt Not found
oxlint Not found
oxlint-tsgolint Not found
tsdown Not foundUsed Package Manager
pnpm
Logs
$ ls ~/.zshenv ~/.zshrc
"/home/mst-mkt/.zshenv": No such file or directory (os error 2)
"/home/mst-mkt/.zshrc": No such file or directory (os error 2)
$ echo $ZDOTDIR
/home/mst-mkt/.config/zsh
$ curl -fsSL https://vite.plus | bash
Setting up VITE+...
Would you want Vite+ to manage Node.js versions?
Press Enter to accept (Y/n):
✔ VITE+ successfully installed!
The Unified Toolchain for the Web.
Get started:
vp create Create a new project
vp env Manage Node.js versions
vp install Install dependencies
vp migrate Migrate to Vite+
Vite+ is now managing Node.js via vp env.
Run vp env doctor to verify your setup, or vp env off to opt out.
Run vp help to see available commands.
Note: Run `source ~/.zshenv` or restart your terminal.
$ ls ~/.zshenv ~/.zshrc
"/home/mst-mkt/.zshrc": No such file or directory (os error 2)
/home/mst-mkt/.zshenv
$ cat ~/.zshenv
# Vite+ bin (https://viteplus.dev)
. "$HOME/.vite-plus/env"
$ vp
zsh: command not found: vpValidations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
Reactions are currently unavailable