summaryrefslogtreecommitdiff
path: root/Meta/build-image-qemu.sh
diff options
context:
space:
mode:
authorChris Frey <cdfrey@foursquare.net>2021-12-11 20:55:03 -0500
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-01-13 03:35:21 -0800
commit319cdf4ff3e53858cf0c03c3fe965ee56d94e895 (patch)
treed4e1b0611ccab40785914ae9d4e358f5a14a2574 /Meta/build-image-qemu.sh
parent8e935ad3b1fe87e1623490c000d68e3c14702d3e (diff)
downloadserenity-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-xMeta/build-image-qemu.sh3
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