#!/bin/bash
set -exuo pipefail
# Run delorean to update the namespaces folder
main() {
  if [ !$(yq -r '.random' file_that_doesnt_exist.yaml) = "true" ]; then
   echo "yes"
  else
   echo "no"
  fi
}
# shellcheck disable=SC2068
main $@
set -e pipefail based on my understanding should exit the bash script on the first occurence of error. However, I get "no" in stdout even though `echo "no" occurs after the error. How does that happen?
 
     
     
    