$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:    bionic

$ apt-cache show bash
Package: bash
Architecture: amd64
Version: 4.4.18-2ubuntu1
Multi-Arch: foreign
Priority: required
Essential: yes
Section: shells
Origin: Ubuntu
[...]

$ which bash
/bin/bash
$ dpkg -S /bin/bash
bash: /bin/bash

The issue is:
$ cat bad
(
    set -e
    false
    echo "Shouldn't happen?"
) && :
$ bash ./bad ; echo $?
Shouldn't happen?
0
$ cat good
(
    set -e
    false
    echo "Shouldn't happen?"
)
$ bash ./good ; echo $?
1

Probably there is something obvious that I'm missing.

cheers,
Bart

Reply via email to