Prevented writing of API docs when exiting with nonzero exit code.