corrected error commands

This commit is contained in:
2026-05-30 09:19:27 +02:00
parent a6ffd1ea94
commit 5cc5556c51

View File

@@ -14,7 +14,7 @@ check_sudo() {
if command -v "sudo" &>/dev/null; then if command -v "sudo" &>/dev/null; then
command="sudo $command" command="sudo $command"
else else
echo "sudo command needed but not found" > /dev/stderr echo "\`sudo\` command needed but not found" >&2
exit 1 exit 1
fi fi
fi fi
@@ -42,7 +42,7 @@ elif [ "$command_args" = "reflector" ]; then
command_args=$(cat /etc/pacman.d/mirrorlist 2>/dev/null | grep -e "With.*reflector" | sed 's/#.*reflector //') command_args=$(cat /etc/pacman.d/mirrorlist 2>/dev/null | grep -e "With.*reflector" | sed 's/#.*reflector //')
# Check if reflector was actually used to generate the mirrorlist # Check if reflector was actually used to generate the mirrorlist
if [ "$command_args" = "" ]; then if [ "$command_args" = "" ]; then
echo "Error: reflector was not used to generate mirrorlist or mirrorlist location differ from standard" echo "Error: reflector was not used to generate mirrorlist or mirrorlist location differ from standard" >&2
exit 1 exit 1
fi fi
su_needed=true su_needed=true