Fix Error check and error message style

This commit is contained in:
justin 2026-01-27 20:41:55 -05:00 committed by Michel Roegl-Brunner
parent 8c4f1ce531
commit 000a7a2701

View File

@ -3092,9 +3092,8 @@ check_container_resources() {
check_container_storage() { check_container_storage() {
usage=$(df / -P | awk 'NR==2 {print $5}' | tr -d '%') usage=$(df / -P | awk 'NR==2 {print $5}' | tr -d '%')
# shellcheck disable=SC2181 if [ -z "$usage" ] || [ "$usage" -lt 0 ]; then
if [ $? -ne 0 ]; then echo -e "${CROSS}${HOLD}${RD}Error: Failed to check disk usage.${CL}"
echo "Error: Failed to check disk usage."
exit 1 exit 1
fi fi
@ -3104,9 +3103,7 @@ check_container_storage() {
read -r prompt read -r prompt
case "$prompt" in case "$prompt" in
[yY][eE][sS] | [yY]) [yY][eE][sS] | [yY]) ;;
# User input is "yes" or "y"; continue
;;
*) *)
echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}"
exit 1 exit 1