parallelshell icon indicating copy to clipboard operation
parallelshell copied to clipboard

cant set env vars on 2.0.0

Open burabure opened this issue 9 years ago • 5 comments

I think this is because of the switch to exec.

this used to work: parallelshell \"NODE_ENV=development nodemon index.js\" \"node webpack-server.js\" \"npm run watch\"

now it throws

parallelshell "export NODE_ENV=development && nodemon index.js"  "node webpack-server.js" "npm run watch"

sh: 1: exec: export: not found
....

burabure avatar Jul 28 '15 18:07 burabure

Hey @burabure thanks for the issue.

You could always run it this way instead:

NODE_ENV=development parallelshell \"nodemon index.js\" \"node webpack-server.js\" \"npm run watch\"

@paulpflug I think we should look at another solution. Possibly revert 2.0.0?

keithamus avatar Jul 28 '15 21:07 keithamus

I think so too.. Maybe we have to take the kill by pgid route. But first I will add more tests with ENV, &&, nesting and everything.

Am 28. Juli 2015 23:36:27 schrieb Keith Cirkel [email protected]:

Hey @burabure thanks for the issue.

You could always run it this way instead:

NODE_ENV=development parallelshell \"nodemon index.js\" \"node 
webpack-server.js\" \"npm run watch\"

@paulpflug I think we should look at another solution. Possibly revert 2.0.0?


Reply to this email directly or view it on GitHub: https://github.com/keithamus/parallelshell/issues/28#issuecomment-125760264

paulpflug avatar Jul 28 '15 21:07 paulpflug

:+1:

keithamus avatar Jul 28 '15 21:07 keithamus

@burabure could you try the version on dev branch?

paulpflug avatar Jul 29 '15 11:07 paulpflug

@darkguy2008 , let me know if this is something of interest to this module: a very simple implementation for supporting env vars - fc75e0896fa0eb5168caf1d5b6c461bc0bc9686b

there is already a module for this, cross-env, that does it much better. so if someone need more complicate parsing, he can always combine the two: calling from parallelshell to cross-env or the other way around.

anyway, I add it with an experimental flag, so it should not create a breaking change (hopefully).

hagaigold avatar Jul 20 '18 16:07 hagaigold