voidzero-dev / voidzero-dev/vite-task

add INIT_CWD environment variable

Open
#243 0 comments 0 reactions 1 assignee View on GitHub

@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.

https://docs.npmjs.com/cli/v8/using-npm/scripts

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.