Commit 6970756f authored by Scott Edlund's avatar Scott Edlund Committed by Bjørn Forsman
Browse files

nixos/homepage-dashboard: fix shellcheck SC2115

Error if variable is null or unset.
parent b9a69c9b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -255,12 +255,14 @@ in
          Restart = "on-failure";
        };

        enableStrictShellChecks = true;

        preStart = ''
          # Related:
          # * https://github.com/NixOS/nixpkgs/issues/346016 ("homepage-dashboard: cache dir is not cleared upon version upgrade")
          # * https://github.com/gethomepage/homepage/discussions/4560 ("homepage NixOS package does not clear cache on upgrade leaving broken state")
          # * https://github.com/vercel/next.js/discussions/58864 ("Feature Request: Allow configuration of cache dir")
          rm -rf "$NIXPKGS_HOMEPAGE_CACHE_DIR"/*
          rm -rf "''${NIXPKGS_HOMEPAGE_CACHE_DIR:?}"/*
        '';
      };