On my system shell sometimes hangs on the outStream.readLine line if the called command also writes to stderr.
I'm not sure what changed, but lately this happens anytime I use shell to invoke a nim compilation. Was all output in the past done to stdout?
In any case, one solution is to use the poStdErrToStdOut flag, but that's nasty because then we always combine stdout and stderr, which is not desirable in many cases.
Another solution is to make use of async to read from stderr and stdout concurrently (I believe that should work, but me and async don't have a very good relationship...).
The third solution is to use threads + channels to do the same. Avoids me having to figure out how to use async properly, but would require to compile with --threads:on always (why is that still not the default? :().