mysticatea / npm-run-all

A CLI tool to run multiple npm-scripts in parallel or sequential.
MIT License
5.72k stars 240 forks source link

Preserve INIT_CWD environment variable #222

Open dobesv opened 2 years ago

dobesv commented 2 years ago

Yarn FAQ suggests a way to share scripts between workspaces in a monorepo. If we use this technique with npm-run-all, however, the INIT_CWD environment variable is replaced with the path to the workspace that the script is defined in.

It would be handy if npm-run-all would propagate the INIT_CWD environment variable to the child script(s) that it runs.