Force Build to Fail on Command Failure

Is there a way to force the Circle CI build to stop and indicate a failure when a command fails? Right now, a command is failing but Circle CI is going on to finish and marks the build as a success. The failing command is in a script that Circle CI runs (which might be relevant).

Failure is determined by a non-zero exit code. So if you are running some custom scripts you must determine yourself if it passes or fails and if it fails have the script return a nonzero exit code.

1 Like

Makes sense. Thank you.