1
0

contrib: "set -e" behaves weird in subshells followed by OR. don't use.

This exits as expected:
```
$ cat s1.sh
#!/bin/bash
set -e
(
    echo "a"
    false
    echo "b"
)

$ ./s1.sh
a
```
This does NOT exit, seemingly because of the outer context?!
```
$ cat s2.sh
#!/bin/bash
set -e
(
    echo "a"
    false
    echo "b"
) || echo "c"

$ ./s2.sh
a
b
```

ref https://unix.stackexchange.com/questions/65532/why-does-set-e-not-work-inside-subshells-with-parenthesis-followed-by-an-or
This commit is contained in:
SomberNight
2025-09-25 13:57:57 +00:00
parent de7612b3b1
commit ffba6061bc
4 changed files with 6 additions and 6 deletions

View File

@@ -95,7 +95,7 @@ info "Building PyInstaller."
popd
# sanity check bootloader is there:
[[ -e "PyInstaller/bootloader/Windows-$PYINST_ARCH-intel/runw.exe" ]] || fail "Could not find runw.exe in target dir!"
) || fail "PyInstaller build failed"
)
info "Installing PyInstaller."
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location ./pyinstaller