fix(wait on exit code): Properly exit when waiting for a zero exit code

Currently we are checking for the truthiness of `child.exitCode` or checking if the timeout has elapsed before continuing on. This doesn't work when waiting for an exit code of 0.