diff options
author | Chris Frey <cdfrey@foursquare.net> | 2021-12-11 20:55:03 -0500 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-01-13 03:35:21 -0800 |
commit | 319cdf4ff3e53858cf0c03c3fe965ee56d94e895 (patch) | |
tree | d4e1b0611ccab40785914ae9d4e358f5a14a2574 /Meta/build-image-qemu.sh | |
parent | 8e935ad3b1fe87e1623490c000d68e3c14702d3e (diff) | |
download | serenity-319cdf4ff3e53858cf0c03c3fe965ee56d94e895.zip |
Meta: Do not ignore error message with exec
When calling sub-programs from shell with exec, the useful || die
idiom does not actually do anything, since the first script is gone.
Diffstat (limited to 'Meta/build-image-qemu.sh')
-rwxr-xr-x | Meta/build-image-qemu.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh index 958c0eadf5..10114ba397 100755 --- a/Meta/build-image-qemu.sh +++ b/Meta/build-image-qemu.sh @@ -8,7 +8,8 @@ die() { } if [ "$(id -u)" != 0 ]; then - exec sudo -E -- "$0" "$@" || die "this script needs to run as root" + sudo -E -- "$0" "$@" || die "this script needs to run as root" + exit 0 else : "${SUDO_UID:=0}" "${SUDO_GID:=0}" fi |