From acff4523f3565fd37f5bd17298b987667f7e6b0a Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:29:40 +0000 Subject: [PATCH] refactor: simplify utils.sh loading with inline sourcing - Replaced conditional file check with direct curl sourcing using process substitution - Streamlined error handling to single-line check --- install_proxmenux.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 7b72c08..a0e605e 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -56,10 +56,8 @@ REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" TEMP_DIR="/tmp/proxmenux-install-$$" # Load utils.sh dependency -if [[ -f "$UTILS_URL" ]]; then - source "$UTILS_URL" -else - msg_error "Failed to load utils dependencies. Please report this issue." +if ! source <(curl -sSf "$UTILS_URL"); then + echo "Error: Could not load utils.sh from $UTILS_URL" exit 1 fi