FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: Add comments to `start-mailserver.sh` and stop using `inherit_errexit` by casperklein · Pull Request #4161 · docker-mailserver/docker-mailserver · GitHub

chore: Add comments to start-mailserver.sh and stop using inherit_errexit - #4161

Merged
casperklein merged 3 commits into
docker-mailserver:masterfrom
casperklein:start-mailserver.sh
Aug 18, 2024
Merged

chore: Add comments to start-mailserver.sh and stop using inherit_errexit#4161
casperklein merged 3 commits into
docker-mailserver:masterfrom
casperklein:start-mailserver.sh

Conversation

casperklein commented Aug 18, 2024
edited by polarathene
Loading

Copy link
Copy Markdown
Member

Description

  • Add some comments.
  • shopt -s inherit_errexit does not seem to serve a function without set -e beeing used. Therefor it can be safely removed?

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 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 self-assigned this Aug 18, 2024
casperklein added this to the v15.0.0 milestone Aug 18, 2024
casperklein added area/scripts kind/improvement Improve an existing feature, configuration file or the documentation labels Aug 18, 2024
casperklein marked this pull request as ready for review August 18, 2024 09:33

polarathene left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I don't know much about this, so I trust you two 😄

polarathene changed the title Add comments and remove 'inherit_errexit' from start-mailserver.sh chore: Add comments and remove 'inherit_errexit' from start-mailserver.sh Aug 18, 2024
polarathene changed the title chore: Add comments and remove 'inherit_errexit' from start-mailserver.sh chore: Add comments to start-mailserver.sh and stop using inherit_errexit Aug 18, 2024

Copy link
Copy Markdown
Member Author

shopt -s inherit_errexit is like set -e but for sub-shells. Using set -e is mandatory for inherit_errexit to work.

#!/bin/bash

set -o errexit # same as 'set -e'
shopt -s inherit_errexit

echo "$(command-not-exist; echo 'This message is not displayed')"

If you comment/remove the "shopt" line, the message is displayed.

casperklein merged commit ab2127b into docker-mailserver:master Aug 18, 2024
casperklein deleted the start-mailserver.sh branch August 18, 2024 22:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scripts kind/improvement Improve an existing feature, configuration file or the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL