mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
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.
This commit is contained in:
parent
8e935ad3b1
commit
319cdf4ff3
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/cdfrey 🔰 Commit: https://github.com/SerenityOS/serenity/commit/319cdf4ff3e Pull-request: https://github.com/SerenityOS/serenity/pull/11224
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue