Compatibility with "nounset" bash option (fixed for bash 4.3) #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As noted in #80 , the main actual issue here is that because we install a DEBUG trap, our code may run even in contexts where the user thinks they've set bash options for their own code only. As such, it would be nice if we were very well behaved.
It's easier to just run the tests entirely under this option -- that saves us from having to think about which code needs to be nounset-safe and which code does not.
The actual code changes are pretty trivial, it's just a matter of applying them consistently, which the tests will enforce. (For whatever version of bash is running on Travis, which currently is 4.3 . We should probably test multiple versions of bash.)
This is based off the upgrade-bats branch which was sent as a separate pull request; #83 .