Skip to content

Commit

Permalink
Merge pull request #22 from phirk/main
Browse files Browse the repository at this point in the history
Fix shellcheck issues
  • Loading branch information
JeroenKnoops authored Oct 6, 2023
2 parents 8e01e86 + fe99943 commit 25ea830
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions get-blackduck-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ version=$4

sbom_type=${5:-"SPDX_22"}

if [ sbom_type == "CYCLONEDX_13" || sbom_type == "CYCLONEDX_14" ]
if [ "$sbom_type" == "CYCLONEDX_13" ] || [ "$sbom_type" == "CYCLONEDX_14" ]
then
echo "INFO: sbomType "CYCLONEDX_13" or "CYCLONEDX_14" allows reportFormat values of "JSON"."
echo "INFO: sbomType \"CYCLONEDX_13\" or \"CYCLONEDX_14\" allows reportFormat values of \"JSON\"."
report_format="JSON"
else
report_format=${6:-"JSON"}
Expand Down Expand Up @@ -207,5 +207,5 @@ report_contents=$(get_report_contents)
echo "| got content information"
echo

echo "sbom-file=report.zip" >> $GITHUB_OUTPUT
echo "sbom-contents=${report_contents}" >> $GITHUB_OUTPUT
echo "sbom-file=report.zip" >> "$GITHUB_OUTPUT"
echo "sbom-contents=${report_contents}" >> "$GITHUB_OUTPUT"

0 comments on commit 25ea830

Please sign in to comment.