Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions diff/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,22 @@ echo "diff<<$delimiter" >>"$GITHUB_OUTPUT"

set -o pipefail

# Capture the exit code from oasdiff command while still getting the output
exit_code=0
if [ -n "$flags" ]; then
output=$(oasdiff diff "$base" "$revision" $flags)
output=$(oasdiff diff "$base" "$revision" $flags) || exit_code=$?
else
output=$(oasdiff diff "$base" "$revision")
output=$(oasdiff diff "$base" "$revision") || exit_code=$?
fi

if [ -n "$output" ]; then
write_output "$output"
write_output "$output"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the space at the end of the line

else
write_output "No changes"
fi

echo "$delimiter" >>"$GITHUB_OUTPUT"
# Always close the multiline output format properly
echo "$delimiter" >>"$GITHUB_OUTPUT"

# Exit with the original exit code from oasdiff
exit $exit_code
Loading