Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with "nounset" bash option (fixed for bash 4.3) #84

Merged
merged 2 commits into from
Dec 17, 2018

Conversation

steinarvk
Copy link
Contributor

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 .

This is necessary for testing with 'nounset'.
Updates tests to run under "nounset" and changes
the code so that the tests pass again.

This resolves rcaloras#80 .

Tests now pass on both bash 4.3 (travis) and 4.4
(my local). We should probably test multiple
versions of bash at some point.
@rcaloras rcaloras merged commit 533b05e into rcaloras:master Dec 17, 2018
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.

2 participants