aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-03-16 16:53:39 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-03-16 16:53:39 +0100
commit77f5d171e17294ebb017a386d4408bf4613dfed7 (patch)
tree1eb7576b8d70a4581278c37c01f74a2566f0217a /src/nix
parent338f2710580b334a754fad28b88c5cb137c83352 (diff)
--override-input: Imply --no-write-lock-file
Fixes #3779.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/flake.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index 2f0c468a8..d37791aba 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -110,6 +110,7 @@ struct CmdFlakeUpdate : FlakeCommand
removeFlag("recreate-lock-file");
removeFlag("update-input");
removeFlag("no-update-lock-file");
+ removeFlag("no-write-lock-file");
}
std::string doc() override
@@ -124,6 +125,7 @@ struct CmdFlakeUpdate : FlakeCommand
settings.tarballTtl = 0;
lockFlags.recreateLockFile = true;
+ lockFlags.writeLockFile = true;
lockFlake();
}
@@ -136,6 +138,12 @@ struct CmdFlakeLock : FlakeCommand
return "create missing lock file entries";
}
+ CmdFlakeLock()
+ {
+ /* Remove flags that don't make sense. */
+ removeFlag("no-write-lock-file");
+ }
+
std::string doc() override
{
return
@@ -147,6 +155,8 @@ struct CmdFlakeLock : FlakeCommand
{
settings.tarballTtl = 0;
+ lockFlags.writeLockFile = true;
+
lockFlake();
}
};