diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-05-29 21:00:44 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-05-29 21:00:44 +0200 |
commit | a9d3524e1f4f0212184d611b3ff3b520619dff8e (patch) | |
tree | a10701237d773ef476365b3c36e6f636bba41c63 | |
parent | 0e32b32fa3655e8a3e028ebb5ac838164a606132 (diff) |
nix flake check: Use read-only mode if we're not building
-rw-r--r-- | src/nix/flake.cc | 2 |
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(); |