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

process exits before output emitted #161

Open ezpuzz opened 5 years ago

ezpuzz commented 5 years ago

I'm running some linting and tests in a docker container with npm-run-all -pn --silent --aggregate-output lint:* test

The output is as I expect except that it cuts off early because the npm-run-all process exits before all the output has fully been written to stdout. This cuts off the test results.

workaround: run without aggregate-output, output is as expected but interleaved.

I guess this only happens when the size of output is large.

ezpuzz commented 5 years ago

https://github.com/mysticatea/npm-run-all/blob/52eaf86242ba408dedd015f53ca7ca368f25a026/lib/run-tasks.js#L133

need to wait for output to be flushed here