update-check: fix 'read' exit status #3688
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, the
read
command fails with exit code 1. That is not an issue, the script continues running.The problem is, that the delimiter (
-d ''
) is set to a null byte. However, the heredoc does not contain a null byte to terminate.So this PR changes the delimiter to
#
, which I also added at the end of the heredoc.As mentioned, that is currently not an issue. It's just not "clean", having a successful command that signals failure via the exit code. This could be a problem in the future, if we decide to introduce
set -e
widely.PS:
-d ''
is equivalent to-d $'\0'
.Type of change
Checklist:
docs/
)CHANGELOG.md