Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure that coveralls report command succeeds when fail_on_error: false is set #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patbl
Copy link

@patbl patbl commented Mar 26, 2024

Previously, if the coveralls.sh script fails to download the coverage reporter, running coveralls report resulted in a command-not-found error (error code 127). This failure once occurred multiple times over the course of a day for me, so it's not not just a theoretical concern.

Fixes #40.

Previously, if the `coveralls.sh` script fails to download the coverage
reporter, running `coveralls report` resulted in a command-not-found
error (error code 127). This failure once occurred multiple times over
the course of a day for me, so it's not not just a theoretical concern.

Fixes coverallsapp#40.
@patbl patbl changed the title fix: Ensure that coveralls command succeeds when fail_on_error: false is set fix: Ensure that coveralls report command succeeds when fail_on_error: false is set Mar 26, 2024
Comment on lines +76 to +82
set +x

exit_status=$?
if [ "${COVERALLS_FAIL_ON_ERROR}" != "1" ]; then
exit_status=0
fi
exit "${exit_status}"
Copy link
Author

@patbl patbl Mar 26, 2024

Choose a reason for hiding this comment

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

I'm wondering whether it would be OK to just add this:

Suggested change
set +x
exit_status=$?
if [ "${COVERALLS_FAIL_ON_ERROR}" != "1" ]; then
exit_status=0
fi
exit "${exit_status}"
exit 0

That's what's done here:

./coveralls 'done' ${args}
exit 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Upload Coverage Result To Coveralls" sometimes fails even when fail_on_error: false is set
1 participant