Natanael Copa wrote:
>I have found a bug (or weird feature?) in busybox ash:
>
>$ dash -c "set -e ; ( false ) ; echo 'should not echo'"
>$ bash -c "set -e ; ( false ) ; echo 'should not echo'"
>$ ash -c "set -e ; ( false ) ; echo 'should not echo'"
>should not echo
>$
>
>It looks like `set -e` does not catch error in ( )

This is true in 1.25.1.  It's fixed in master by this:

commit 204c7fb2293f67f6277f917e854188f5540e6955
Author: Rostislav Skudnov <[email protected]>
Date:   Fri Sep 16 19:04:02 2016 +0000

    ash: exit after subshell error when errexit option is set
    
    When "set -e" option is on, shell must exit when any command fails,
    including compound commands of the form (compound-list) executed in a
    subshell. Bash and dash shells have this behaviour.
    
    Also add a corresponding testcase.

Ron
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to