Re: Bash will continue executing main code path instead of current code path on error

2019-04-18 Thread Chet Ramey
On 4/18/19 11:32 AM, Thomas Deutschmann wrote: > Actual result: > == > bash-test.sh: line 5: bar=${${foo}_blah}: bad substitution > Rest of the script > > > Expected result: > > bash-test.sh: line 5: bar=${${foo}_blah}: bad substitution > I run after the failing_func

Re: Bash 5 incorrectly overrides BASH_COMPAT env variable

2019-04-18 Thread Chet Ramey
On 4/18/19 10:46 AM, Marc-Antoine Perennou wrote: > Hello, > > After debugging why the unit tests of paludis (package manager from > Gentoo and Exherbo) were failing with bash 5, I noticed a really weird > behaviour which wasn't present in earlier versions of bash. > > All the exemples I could fi

Bash 5 incorrectly overrides BASH_COMPAT env variable

2019-04-18 Thread Marc-Antoine Perennou
Hello, After debugging why the unit tests of paludis (package manager from Gentoo and Exherbo) were failing with bash 5, I noticed a really weird behaviour which wasn't present in earlier versions of bash. All the exemples I could find support the values we're currently checking for BASH_COMPAT i

Bash will continue executing main code path instead of current code path on error

2019-04-18 Thread Thomas Deutschmann
Hi, Test script: #!/bin/bash failing_function() { local foo=${1} # force bad substitution local bar=${${foo}_blah} echo "You will never see this text!" } if [[ 1 -eq 1 ]] then # Current code path failing_function echo "I run after the failing_function!" e