Closed colin969 closed 3 years ago
cross-env
node
npm
What you did: Trying to run cross-env-shell with multiple commands.
What happened: The second command doesn't get the environmental variables
Problem description: On Windows only and when called via npx, the second command doesn't get the environmental variables. No issue on Linux or Mac.
Used the example in the readme to keep it as simple as possible
Script - "greet": "cross-env-shell GREETING=Hi NAME=Joe \"echo $GREETING && echo $NAME\"" Output - Hi Joe Script - "greet": "npx cross-env-shell GREETING=Hi NAME=Joe \"echo $GREETING && echo $NAME\"" Output - Hi $NAME
Suggested Solution: I'm not familiar enough to tell but I figure it's a breaking change to npx because it was working a few months ago.
Running without npx works fine in an npm script though, so I'm using that for now.
https://github.com/kentcdodds/cross-env/issues/257
cross-env
version: 7.0.2node
version: 12.16.3npm
version: 6.14.4What you did: Trying to run cross-env-shell with multiple commands.
What happened: The second command doesn't get the environmental variables
Problem description: On Windows only and when called via npx, the second command doesn't get the environmental variables. No issue on Linux or Mac.
Used the example in the readme to keep it as simple as possible
Suggested Solution: I'm not familiar enough to tell but I figure it's a breaking change to npx because it was working a few months ago.
Running without npx works fine in an npm script though, so I'm using that for now.