Open adudek opened 6 years ago
Hi @adudek! The framework was not tested with set -u
- we'd like to fix it, and unbound vars are a known issue, if I'm not mistaken @tterranigma was trying to track them down and fix them. we're brainstorming a simplification of the framework in #45.
Note for future: "most sane" bash settings that I recommend should include at least: set +H -euo pipefail (-e should be suppressed only in try block) it is a pain to handle all potentially unassigned values, but less than potentially destroying data :)
Yes, I totally agree @adudek. We'll take this into consideration when planning 3.0. Thanks for your feedback!
tested in bash 4.3+ when setting 'set -u' in example/array.sh, I receive: bash-oo-framework/lib/util/command.sh: line 34: $3: unbound variable
there are more errors elsewhere, after performing "${unboundvar:-}"
Is this conscious design decision related to bash version? Sometimes I want my script to fail, not to cause more mayhem in unpredictable way. How to overcome this?