Scripts and CI systems have no eyes; they decide success or failure only from a command's exit code. Zero means success and anything else is a failure, which &&, || and if all rely on. Use exit codes to stop a deploy when a test fails or to return a clear status from your own script with exit. Watch out for pipelines, which report only the last command, so a failing build piped into tee can still look green.