Close #1169 Failed build should return non-zero exit code