When you’re doing DevOps or Continuous Integration or Continuous Delivery, you sometimes write shell scripts.
However, in the sequential execution of the shell script, there may be an intermediate stage that will report an error, and the execution will continue.
So how do you avoid the problem of quitting later execution when something goes wrong?
Reference code:
#!/bin/bash
set -o errexit
Add at the beginning of the set -o errexit code> can (or
set -e code>)
To be closed when the set + o errexit code> (or
set code>) + e