Closed davesnx closed 7 years ago
I think, this should work:
parallelshell "ENV=3 echo 1"
@paulpflug isn't working, it's the same error.
The spawn is reading ENV=3
as a command, If I have time I will open a PR with the fix
basically parallelshell does a sh -c "command"
when I call sh -c "TEST=test env"
, TEST is there but sh -c "TEST=test echo $TEST"
doesn't print anything
seems it is a problem of echo, maybe it computes its own env?
I don't think so... when u call sh -c "ENV"
shows all the ENV of the system
Also, when u run parallelshell "TEST=test"
throws and error of sh
If you run sh -a
=> Mark variables which are modified or created for export.
"TEST=test" should only work for the following command if you want to export to ENV then you have to use "export", but parallelshell doesn't support ENV exchange between different commands.
Am 21. Februar 2016 1:48:50 nachm. schrieb David Sancho notifications@github.com:
I don't think so... when u call
sh -c "ENV"
shows all the ENV of the system Also, when u runparallelshell "TEST=test"
throws and error of sh
Reply to this email directly or view it on GitHub: https://github.com/keithamus/parallelshell/issues/45#issuecomment-186818234
Hello, You can't declare variables, I guess that is because isn't a process (?). I'm not sure if it's an issue or not. The use case for that is you want to define some env variables at the same time of running a process. i.e.
Edit: Reading the code I'm figuring out what's going on, the child-process spawn is throwing an error.