]> git.scottworley.com Git - nix-profile-gc/blobdiff - modules/profile-gc.nix
profile-gc: No unbound variable references
[nix-profile-gc] / modules / profile-gc.nix
index 8e693010f647c09d4849f16f515c7ba2b9e6b300..02b723829fba668014722f18faa633a647781d70 100644 (file)
@@ -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