From 2af5fb92121db5bc8d8bfe7dfdf4ce1fcbdba67d Mon Sep 17 00:00:00 2001 From: DavHau Date: Thu, 15 Dec 2022 12:46:47 +0700 Subject: [PATCH] fix: use warn instead of throw if `projects` unspecified --- src/lib.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/lib.nix b/src/lib.nix index 864679f1..d13a95b0 100644 --- a/src/lib.nix +++ b/src/lib.nix @@ -201,24 +201,20 @@ {} flakifiedOutputsList; - errorFlakeOutputs = { + errorFlakeOutputs = l.warn (missingProjectsError source) { apps = l.mapAttrs (system: pkgs: { detect-projects = dream2nixFor.${system}.flakeApps.detect-projects; - - error = throw (missingProjectsError source); }) allPkgs; }; - finalOutputs = let - givenProjects = args.projects or {}; - in + finalOutputs = if - (givenProjects == {} && autoProjects == false) - || (l.isPath givenProjects && ! l.pathExists givenProjects) + (args ? projects && l.isPath args.projects && ! l.pathExists args.projects) + || (projects == {} && autoProjects == false) then errorFlakeOutputs else flakeOutputsBuilders; in