Fix jq in CI

This commit is contained in:
Michael Goulet 2023-09-25 14:30:26 +00:00
parent 959b2c703d
commit 2ffef3949e

View File

@ -10,7 +10,7 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
# Load extra environment variables # Load extra environment variables
vars="${EXTRA_VARIABLES-}" vars="${EXTRA_VARIABLES-}"
echo "${vars}" | jq '' >/dev/null # Validate JSON and exit on errors echo "${vars}" | jq '.' >/dev/null # Validate JSON and exit on errors
for key in $(echo "${vars}" | jq "keys[]" -r); do for key in $(echo "${vars}" | jq "keys[]" -r); do
# On Windows, for whatever reason, $key contains the BOM character in it, # On Windows, for whatever reason, $key contains the BOM character in it,
# and that messes up `jq ".${key}"`. This line strips the BOM from the key. # and that messes up `jq ".${key}"`. This line strips the BOM from the key.