We're seeing some test failures on the CI where the build has no output.
Sure enough, using Process.Exited is trap. It doesn't guarantee that all
of the output has been written when it's trigger.
This is a different approach that shouldn't suffer from the same
problem.