Bash test builtin fails on: test -n '>' -a 1 -eq 1

2024-10-22 Thread cirrus . mazurka-0t
The following produces a `bash: test: too many arguments` exception in `test`, with exit status 2: ``` bash v='>' test -n "$v" -a yes '!=' no # bash: test: too many arguments echo $? # 2 test -n '>' -a 1 -eq 1 # bash: test: too many arguments echo $? # 2 [ -n '>' -a 1 -eq 1 ] # bash: [: too man

errexit is not respected on nested functions when parent function preceeds ||

2023-08-08 Thread cirrus . mazurka-0t--- via Bug reports for the GNU Bourne Again SHell
I think I've found a bug with Bash's handling of errexit. The following code: ``` bash #!/usr/bin/env bash set -Eeuo pipefail shopt -s huponexit shopt -s inherit_errexit function child_function { return 1 } function parent_function { child_function echo "parent noticed