From f222fba4dca69919d28468467e6e5c4c859cfc13 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 3 Feb 2022 20:51:47 -0600 Subject: [PATCH] Allow missing flake.nix for --override-input target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At this point, we don’t know if the input is a flake or not. So, we should allow the user to override the input with a directory without a flake.nix. Ideally, we could figure whether the input was originally a flake or not, but that would require instantiating the whole flake. So just allow it to be missing here, and rely on checks later on to verify the input for us. --- src/libcmd/installables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 38a177f80..5e8b62e1a 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -97,7 +97,7 @@ MixFlakeOptions::MixFlakeOptions() lockFlags.writeLockFile = false; lockFlags.inputOverrides.insert_or_assign( flake::parseInputPath(inputPath), - parseFlakeRef(flakeRef, absPath("."))); + parseFlakeRef(flakeRef, absPath("."), true)); }} });