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
ZDOTDIR persistently set to a custom directory (e.g. via /etc/zsh/zshenv)
- Run
curl -fsSL https://vite.plus | bash
- PATH configuration is written to
$HOME/.zshenv and $HOME/.zshrc instead of $ZDOTDIR/.zshenv and $ZDOTDIR/.zshrc
- Opening a new shell does not have
vp in 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 found
Used 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: vp
Validations
Describe the bug
install.shignores 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:
ZDOTDIR)$HOME/.zshenv->$ZDOTDIR/.zshenv$HOME/.zshrc->$ZDOTDIR/.zshrcXDG_CONFIG_HOME)$HOME/.config/fish/conf.d/vite-plus.fish->$XDG_CONFIG_HOME/fish/conf.d/vite-plus.fishUsers with custom config directories will have PATH configuration written to the wrong location, and
vpmay not be available in new shells.Reproduction
N/A
Steps to reproduce
ZDOTDIRpersistently set to a custom directory (e.g. via/etc/zsh/zshenv)curl -fsSL https://vite.plus | bash$HOME/.zshenvand$HOME/.zshrcinstead of$ZDOTDIR/.zshenvand$ZDOTDIR/.zshrcvpin PATH (zsh: command not found: vp)System Info
Used Package Manager
pnpm
Logs
Validations