voidzero-dev / voidzero-dev/vite-task
add INIT_CWD environment variable
Open
@fengmk2 is already working on this.
Since Mar 14, 2026.
- Dominant language
- Rust
- Stars
- 466
- Forks
- 42
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 19
Description
Imported from https://github.com/voidzero-dev/vite-plus/issues/74
Scripts are run from the root of the package folder, regardless of what the current working directory is when npm is invoked. If you want your script to use different behavior based on what subdirectory you're in, you can use the INIT_CWD environment variable, which holds the full path you were in when you ran npm run.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.