From 10da8108e5fc5348220768524172b3dbe1049529 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Fri, 8 May 2026 18:41:48 -0400 Subject: [PATCH] fix: detect_hosts() aborts when REMOTE_ID is empty on single-server sparse checkout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ${!REMOTE_ID:-unknown} with REMOTE_ID="" is a fatal bash error that terminates the entire function — not just the line. All subsequent aliases (EMBY_CONTAINER, TRANSCODE_SSD, RAMDISK_LOW_GB, SSH_KEY) were never set, causing awk syntax errors and "SSD fallback path missing" warnings in every transcode script invocation. Guard with an explicit empty check instead of relying on the :- fallback, which bash does not apply when the indirect expansion itself is invalid. Co-Authored-By: Claude Sonnet 4.6 --- common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.sh b/common.sh index a4f9607..e39a00a 100644 --- a/common.sh +++ b/common.sh @@ -452,7 +452,7 @@ detect_hosts() { # ── Set host name strings ───────────────────────────────────────────────── LOCAL_SERVER_NAME="${!MY_ID}" - REMOTE_SERVER_NAME="${!REMOTE_ID:-unknown}" + [[ -n "$REMOTE_ID" ]] && REMOTE_SERVER_NAME="${!REMOTE_ID}" || REMOTE_SERVER_NAME="unknown" # ── Set SSH key ─────────────────────────────────────────────────────────── local ssh_key_var="${MY_ID}_SSH_KEY"