Skip to content

add INIT_CWD environment variable #243

Closed as duplicate
Closed as duplicate

Description

@crusty-voidzero

Imported from voidzero-dev/vite-plus#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions