Skip to content

add compatibility for Bash 4 to setup.sh#2519

Merged
georglauterbach merged 1 commit intomasterfrom
scripts/setup.sh/compatibility
Apr 1, 2022
Merged

add compatibility for Bash 4 to setup.sh#2519
georglauterbach merged 1 commit intomasterfrom
scripts/setup.sh/compatibility

Conversation

@georglauterbach
Copy link
Copy Markdown
Member

@georglauterbach georglauterbach commented Apr 1, 2022

Description

The command shopt -s inherit_errexit does not work in Bash < 4.4. This
commit fixes the error.

Fixes #2518

Type of change

  • Improvement (non-breaking change that does improve existing functionality)

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

The command `shopt -s inherit_errexit` does not work in Bash < v5. This
commit fixes the error.
@georglauterbach georglauterbach added area/scripts kind/improvement Improve an existing feature, configuration file or the documentation labels Apr 1, 2022
@georglauterbach georglauterbach added this to the v11.0.0 milestone Apr 1, 2022
@georglauterbach georglauterbach self-assigned this Apr 1, 2022
@polarathene
Copy link
Copy Markdown
Member

The command shopt -s inherit_errexit does not work in Bash < v5.

What was the purpose for this line btw? You introduced it late last year here without much context to go by.

@georglauterbach
Copy link
Copy Markdown
Member Author

The command shopt -s inherit_errexit does not work in Bash < v5.

What was the purpose for this line btw? You introduced it late last year here without much context to go by.

A nice example and explanation of why one would want to enable this option: https://nicolaw.uk/inherit_errexit.html

I though this was a good addition to this script, that's all :)

@georglauterbach georglauterbach merged commit 2707474 into master Apr 1, 2022
@georglauterbach georglauterbach deleted the scripts/setup.sh/compatibility branch April 1, 2022 17:10
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.

centos 7 cannot run ./setup.sh help

3 participants