Skip to content

Commit

Permalink
Merge pull request #36 from nayuta/add_error_message_when_trivy_comma…
Browse files Browse the repository at this point in the history
…nd_and_target_is_not_supplied

Add error message when trivy_command and trivy_target are not provided
  • Loading branch information
nayuta committed Mar 21, 2024
2 parents e3b2989 + 94145a3 commit 1727281
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ if [[ "$RUNNER_DEBUG" = "1" ]]; then
set -x
fi

if [[ -z "${INPUT_TRIVY_COMMAND}" ]]; then
echo "Error: Missing required input 'trivy_command'."
exit 1
fi

if [[ -z "${INPUT_TRIVY_TARGET}" ]]; then
echo "Error: Missing required input 'trivy_target'."
exit 1
fi

# Fail fast on errors, unset variables, and failures in piped commands
set -Eeuo pipefail

Expand Down

0 comments on commit 1727281

Please sign in to comment.