From bba7735834ca7717d617f97825f2cfc745b30cf7 Mon Sep 17 00:00:00 2001 From: Celestial Nebula <41875671+CelestialNebula@users.noreply.github.com> Date: Fri, 7 Apr 2023 23:06:25 +0000 Subject: [PATCH] updater.sh/prefsCleaner.sh: quote command substitutions Co-authored-by: Mohammed Anas --- prefsCleaner.sh | 2 +- updater.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/prefsCleaner.sh b/prefsCleaner.sh index 537c91f..a23d2c7 100755 --- a/prefsCleaner.sh +++ b/prefsCleaner.sh @@ -9,7 +9,7 @@ ## DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in update_prefsCleaner() ) # Check if running as root and if any files have the owner/group as root/wheel. -if [ "${EUID:-$(id -u)}" -eq 0 ]; then +if [ "${EUID:-"$(id -u)"}" -eq 0 ]; then printf 'You should not run this with elevated privileges (such as with doas/sudo).\n' exit 1 elif [ -n "$(find ./ -user 0 -o -group 0)" ]; then diff --git a/updater.sh b/updater.sh index 25896ab..362e40d 100755 --- a/updater.sh +++ b/updater.sh @@ -9,7 +9,7 @@ ## DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in update_updater() ) # Check if running as root and if any files have the owner/group as root/wheel. -if [ "${EUID:-$(id -u)}" -eq 0 ]; then +if [ "${EUID:-"$(id -u)"}" -eq 0 ]; then printf 'You should not run this with elevated privileges (such as with doas/sudo).\n' exit 1 elif [ -n "$(find ./ -user 0 -o -group 0)" ]; then