Skip to content

Conversation

antwal
Copy link

@antwal antwal commented Jun 25, 2021

Fix for use with "set -Eeuo pipefail", not working if is set "-eu" on main script

Fix for use with "set -Eeuo pipefail", not working if is set "-eu" on main script
@albfan
Copy link
Owner

albfan commented Jun 26, 2021

This is the what, but you don't explain the why.

First open an issue to discuss why we need this and how it should be implemented.

Always unconditional is a no go

@antwal
Copy link
Author

antwal commented Jun 26, 2021

This is the what, but you don't explain the why.

First open an issue to discuss why we need this and how it should be implemented.

Always unconditional is a no go

hi, the documentation is here, I edited the script manually to make it work inside another bash application; there are also other errors but they are not important, since everything works. Thansk.

@albfan
Copy link
Owner

albfan commented Jun 26, 2021

Describe that use case would be more interesting.

Still not sure why you need to fail as soon as possible.

@bairamovazat
Copy link

I agree with the author. Without adding these fixes, using "set -Eeuo pipefail" in a script that uses cfg_parser causes an error.
To be precise, the script terminates due to receiving a signal.

@albfan
Copy link
Owner

albfan commented Mar 24, 2022

So finally, I'm documenting what this issue is about.

http://redsymbol.net/articles/unofficial-bash-strict-mode/

But this PR is about add set -eu. Then possible use case is your example on #43. I suggest to work on a test case that shows a fail fixed with that setup.

I will take a look myself later

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.

3 participants