From: Scott Worley Date: Thu, 17 Nov 2022 14:03:04 +0000 (-0800) Subject: profile-gc: No unbound variable references X-Git-Url: http://git.scottworley.com/nix-profile-gc/commitdiff_plain/be8ae8748a47e5e696ab955012a61f73c1b3e6c0?ds=sidebyside profile-gc: No unbound variable references --- diff --git a/modules/profile-gc.nix b/modules/profile-gc.nix index 8e69301..02b7238 100644 --- a/modules/profile-gc.nix +++ b/modules/profile-gc.nix @@ -161,11 +161,11 @@ in { echo "Keeeping current profile $p" >&2 continue fi - if [[ "''${active_targets[$(${pkgs.coreutils}/bin/readlink "$p")]}" ]];then + if [[ "''${active_targets[$(${pkgs.coreutils}/bin/readlink "$p")]:-}" ]];then echo "Keeeping active system/boot profile $p" >&2 continue fi - if [[ "''${active[$p]}" ]];then + if [[ "''${active[$p]:-}" ]];then echo "Keeeping active profile $p" >&2 continue fi