Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
- fixed error message
- checks for `--mode` and not only for `--mode task` now
  • Loading branch information
Arteiii committed Mar 4, 2025
1 parent 43a64ff commit 57db59e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ if [[ "$ARGS" =~ "--output " ]] && [ -n "${INPUT_OUTPUT:-}" ]; then
exit 1
fi

# If `--mode task` occurs in args and `INPUT_CHECKBOX` is set, exit with an error
if [[ "$ARGS" =~ "--mode task" ]] && [ -n "${INPUT_CHECKBOX:-}" ]; then
echo "Error: '--mode task' is set in args as well as in the action configuration. Please remove one of them."
exit 1
# If `--mode` occurs in args and `INPUT_CHECKBOX` is set, exit with an error
# Use `--mode` instead of `--mode task` to ensure that the checkbox is not getting overwritten
if [[ "$ARGS" =~ "--mode" ]] && [ -n "${INPUT_CHECKBOX:-}" ]; then
echo "Error: '--mode' is set in args but 'checkbox' is set in the action configuration. Please remove one of them to avoid conflicts."
exit 1
fi

# Add `--mode task` to args if `INPUT_CHECKBOX` is true
Expand Down

0 comments on commit 57db59e

Please sign in to comment.