bash-ini-parser icon indicating copy to clipboard operation
bash-ini-parser copied to clipboard

Bash Set

Open antwal opened this issue 3 years ago • 5 comments

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

antwal avatar Jun 25 '21 23:06 antwal

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

albfan avatar Jun 26 '21 05:06 albfan

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.

antwal avatar Jun 26 '21 08:06 antwal

Describe that use case would be more interesting.

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

albfan avatar Jun 26 '21 14:06 albfan

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.

bairamovazat avatar Mar 24 '22 17:03 bairamovazat

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

albfan avatar Mar 24 '22 19:03 albfan