niieani / bash-oo-framework

Bash Infinity is a modern standard library / framework / boilerplate for Bash
https://github.com/niieani/bash-oo-framework/discussions
MIT License
5.57k stars 247 forks source link

try/catch does not restore prior set -e value #2

Closed charles-dyfis-net closed 8 years ago

charles-dyfis-net commented 9 years ago

...but rather forces -e to be unset when leaving a try block, regardless of its prior value.

niieani commented 9 years ago

Indeed, I thought about it. I left it like that on purpose, because you're not supposed to use the framework with -e set anyway (since that defeats the point of using error handling or try & catch). It's an easy fix though as it would only require capturing the flag first and setting it to the previous setting. Feel free to file a pull request.

niieani commented 8 years ago

Solved with v2.0