aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-29 21:00:44 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-05-29 21:00:44 +0200
commita9d3524e1f4f0212184d611b3ff3b520619dff8e (patch)
treea10701237d773ef476365b3c36e6f636bba41c63
parent0e32b32fa3655e8a3e028ebb5ac838164a606132 (diff)
nix flake check: Use read-only mode if we're not building
-rw-r--r--src/nix/flake.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index 19e97aed9..0be003da2 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -259,6 +259,8 @@ struct CmdFlakeCheck : FlakeCommand, MixJSON
void run(nix::ref<nix::Store> store) override
{
+ settings.readOnlyMode = !build;
+
auto state = getEvalState();
auto flake = resolveFlake();