nix flake check: Use read-only mode if we're not building

This commit is contained in:
Eelco Dolstra 2019-05-29 21:00:44 +02:00
parent 0e32b32fa3
commit a9d3524e1f
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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();