fix string contains (#46)

This commit is contained in:
Baruch Odem (Rothkoff)
2022-03-11 13:19:58 +02:00
committed by GitHub
parent a850bd533c
commit 9674b9d930

View File

@ -46,8 +46,8 @@ fi
###############################################
# Add JSON as Report Format if not present #
###############################################
if [ ! -z "$INPUT_OUTPUT_FORMATS" ]; then
if [[ "json" == *"$INPUT_OUTPUT_FORMATS"* ]]; then
if [ -n "$INPUT_OUTPUT_FORMATS" ]; then
if [[ $INPUT_OUTPUT_FORMATS == *"json"* ]]; then
OUTPUT_FORMATS_PARAM="--report-formats $INPUT_OUTPUT_FORMATS"
else
OUTPUT_FORMATS_PARAM="--report-formats $INPUT_OUTPUT_FORMATS,json"