Skip to content

Use `-z` and `-euxo pipefail` for Shib secrets

This PR fixes a logic error in the shib_retrieve_secrets.sh script. Per the Bash user manual, -x checks if file is executable while -z checks if a string variable has zero length.

This PR also changes the shell options set by the script from set -e to set -euxo pipefail. This 1) treats unbound variables as errors when performing parameter expansion (-u), 2) prints a command trace in certain instances (-x), and sets the pipefail option (-o pipefail). See the Bash set documentation for additional information.

cc: @andrew-petro @jsamsa

Merge request reports