Skip to content

Commit

Permalink
Avoid leaking secrets when running in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed May 14, 2024
1 parent e95a686 commit bcda506
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ci/build-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ function modtime () {
function ensure_vars () {
# Make sure variables are defined, and export them.
for var in "$@"; do
if [ -z "${!var}" ]; then
# The +x is needed to avoid leaking secrets when running with
# bash -ex
if [ -z ${!var+x} ]; then
echo "$(basename "$0"): error: required variable $var not defined!" >&2
exit 1
else
Expand Down

0 comments on commit bcda506

Please sign in to comment.