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

update-check: fix 'read' exit status #3688

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

casperklein
Copy link
Member

@casperklein casperklein commented Dec 7, 2023

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'.

-d delim continue until the first character of DELIM is read, rather than newline

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added information about changes made in this PR to CHANGELOG.md

@casperklein casperklein marked this pull request as ready for review December 7, 2023 17:57
@casperklein casperklein self-assigned this Dec 7, 2023
@casperklein casperklein added this to the v13.1.0 milestone Dec 7, 2023
polarathene
polarathene previously approved these changes Dec 7, 2023
georglauterbach
georglauterbach previously approved these changes Dec 7, 2023
@georglauterbach georglauterbach added area/scripts kind/bug/fix A fix (PR) for a confirmed bug labels Dec 7, 2023
@georglauterbach georglauterbach dismissed stale reviews from polarathene and themself via 802266d December 7, 2023 22:55
@casperklein
Copy link
Member Author

fyi: test parallel/set3 failed. Re-running the test set was successful.

@casperklein casperklein merged commit d3b4e94 into docker-mailserver:master Dec 8, 2023
7 checks passed
@casperklein casperklein deleted the update-check branch December 8, 2023 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scripts kind/bug/fix A fix (PR) for a confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants