From beb6799d7868ccc644a98f112e2f18f368b39abd Mon Sep 17 00:00:00 2001 From: Adam0 Date: Tue, 18 Aug 2026 18:26:04 -0400 Subject: [PATCH] Handle unavailable Proton containers --- modules/pkgs/proton-port-forward.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/pkgs/proton-port-forward.nix b/modules/pkgs/proton-port-forward.nix index e2b8e9b..d5c35a0 100644 --- a/modules/pkgs/proton-port-forward.nix +++ b/modules/pkgs/proton-port-forward.nix @@ -48,7 +48,8 @@ container="$1" network="$2" - podman inspect --type container --format json "$container" 2>/dev/null \ + container_json="$(podman inspect --type container --format json "$container" 2>/dev/null)" || return 0 + printf '%s\n' "$container_json" \ | jq -r --arg network "$network" '.[0].NetworkSettings.Networks[$network].IPAddress // empty' } -- 2.51.2