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
This commit is contained in:
cod378
2025-11-12 04:29:40 +00:00
parent bf71e1f9b8
commit acff4523f3

View File

@@ -56,10 +56,8 @@ REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git"
TEMP_DIR="/tmp/proxmenux-install-$$" TEMP_DIR="/tmp/proxmenux-install-$$"
# Load utils.sh dependency # Load utils.sh dependency
if [[ -f "$UTILS_URL" ]]; then if ! source <(curl -sSf "$UTILS_URL"); then
source "$UTILS_URL" echo "Error: Could not load utils.sh from $UTILS_URL"
else
msg_error "Failed to load utils dependencies. Please report this issue."
exit 1 exit 1
fi fi