Skip to content

Commit 064132b

Browse files
authored
Merge pull request #57 from benner/fix/action-output-file-exit-code
fix: avoid exit code 1 when output-file is not set
2 parents 4f968cd + 35bb40c commit 064132b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,7 @@ runs:
9797
[[ -n "$CG_REQUIRE_TRAILER" ]] && ARGS+=(--require-trailer "$CG_REQUIRE_TRAILER")
9898
[[ -n "$CG_OUTPUT_FILE" ]] && ARGS+=(--output-file "$CG_OUTPUT_FILE")
9999
commit-guard "${ARGS[@]}"
100-
[[ -n "$CG_OUTPUT_FILE" ]] && echo "output-file=$CG_OUTPUT_FILE" >> "$GITHUB_OUTPUT"
100+
if [[ -n "$CG_OUTPUT_FILE" ]]; then
101+
echo "output-file=$CG_OUTPUT_FILE" >> "$GITHUB_OUTPUT"
102+
fi
101103
shell: bash

0 commit comments

Comments
 (0)