Skip to content

Commit

Permalink
Don't use read-only mode for nix build --dry-run
Browse files Browse the repository at this point in the history
In dry run mode, new derivations can't be create, so running the command on anything that has not been evaluated before results in an error message of the form `don't know how to build these paths (may be caused by read-only store access)`.

For comparison, the classical `nix-build --dry-run` doesn't use read-only mode.

Closes NixOS#1795
  • Loading branch information
madjar authored Jul 3, 2020
1 parent dfaad37 commit ea9aca2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/nix/installables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,6 @@ std::shared_ptr<Installable> parseInstallable(
Buildables build(ref<Store> store, RealiseMode mode,
std::vector<std::shared_ptr<Installable>> installables)
{
if (mode != Build)
settings.readOnlyMode = true;

Buildables buildables;

std::vector<StorePathWithOutputs> pathsToBuild;
Expand Down

0 comments on commit ea9aca2

Please sign in to comment.