nixos: fix hdhr autodiscovery when host unset

This commit is contained in:
every.channel 2026-02-17 23:53:43 -08:00
parent 05af210e60
commit f62101f754
No known key found for this signature in database

View file

@ -200,9 +200,11 @@ in
exit 2 exit 2
fi fi
base="${lib.escapeShellArg fixedHost}" # Note: don't wrap lib.escapeShellArg in double-quotes, otherwise empty strings
# become a literal two-quote token and break discovery.
base=${lib.escapeShellArg fixedHost}
if [[ -z "$base" ]]; then if [[ -z "$base" ]]; then
dev_id="${lib.escapeShellArg deviceId}" dev_id=${lib.escapeShellArg deviceId}
if [[ -z "$dev_id" ]]; then if [[ -z "$dev_id" ]]; then
echo "ec-node: missing hdhomerun.host and hdhomerun.deviceId" >&2 echo "ec-node: missing hdhomerun.host and hdhomerun.deviceId" >&2
exit 2 exit 2