Skip to content

Commit

Permalink
Handle if null
Browse files Browse the repository at this point in the history
  • Loading branch information
Rindrics committed Jun 15, 2024
1 parent e5a6120 commit 488bb18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/validate-param.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ echo "${PARAMS}" | jq -c 'to_entries | .[]' | while read -r step; do

ACTUAL_VALUE=$(echo "${STEP_CONTENT}" | yq e ".${PARAM}" -)

if [ "${ACTUAL_VALUE}" == "null" ]; then
echo "The parameter ${PARAM} for step ${STEP_ID} is not set."
exit 1
fi

if [ "${ACTUAL_VALUE}" != "${EXPECTED_VALUE}" ]; then
echo "The parameter ${PARAM} for step ${STEP_ID} is not set to ${EXPECTED_VALUE}. Current value: ${ACTUAL_VALUE}"
exit 1
Expand Down

0 comments on commit 488bb18

Please sign in to comment.