darkguy2008 / parallelshell

Run multiple shell commands in parallel
501 stars 44 forks source link

Fix BUG: Assign variables throw and error #48

Closed davesnx closed 8 years ago

davesnx commented 8 years ago

Hello @keithamus,

As I comment on the Issue https://github.com/keithamus/parallelshell/issues/45, parallelshell can't assign a variable on a command that execute.

I didn't know why, but I found a real use case without any work-arround.

Reading a little bit the sh -c's documentation, I found that you can use -a for make variables to export. But isn't exactly what I want, but still adds the possibility of export a variable with parallelshell. TODO: Check if Linux/Windows is working fine.

and then I figure it out, that the condition of add 'exec' on the commands it's only for non window platforms, just added mac and works fine the assignment.

I fixed also:

So... the only 'line of code` of this PR is: https://github.com/keithamus/parallelshell/compare/master...davesnx:Issue45?expand=1#diff-168726dbe96b3ce427e7fedce31bb0bcR103

davesnx commented 8 years ago

There's something that I need to do for merge this? @keithamus @jackysee @chaines @dracos @jeffcharles