without quotes, the statement is evaluated as true
Details of Change
Surround variable with quotes
Issue
kustomize_output_file is optional, not providing it results in a failing job
Test Results
I created this script (it replicates the current implementation) and added quotes
kustomize_output_file=""
if [ -n "${INPUT_KUSTOMIZE_OUTPUT_FILE}" ]; then
kustomize_output_file=${INPUT_KUSTOMIZE_OUTPUT_FILE}
fi
echo $kustomize_output_file
if [ -n "${kustomize_output_file}" ]; then
echo "build: writing output to ${kustomize_output_file}"
fi
INPUT_KUSTOMIZE_OUTPUT_FILE="ok" sh script.sh
ok
build: writing output to ok
without quotes, the statement is evaluated as true
Details of Change
Surround variable with quotes
Issue
kustomize_output_file
is optional, not providing it results in a failing jobTest Results
I created this script (it replicates the current implementation) and added quotes