about summary refs log tree commit diff
path: root/src/nix
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-02-07T20·58-0600
committerWill Dietz <w@wdtz.org>2018-02-07T21·20-0600
commit98031b6050000bccef915b99cf3a2ed810a1b35e (patch)
treee5ca44b566cd9a1fe72d8cd22a45f5cbec96612a /src/nix
parent3780435a0e3166ff898b33b8eb9a057ffa16ce67 (diff)
nix build: Don't create output links with --dry-run.
Fixes #1849.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/build.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc
index f7c99f12dbbf..093415a0de12 100644
--- a/src/nix/build.cc
+++ b/src/nix/build.cc
@@ -52,6 +52,8 @@ struct CmdBuild : MixDryRun, InstallablesCommand
     {
         auto buildables = toBuildables(store, dryRun ? DryRun : Build, installables);
 
+        if (dryRun) return;
+
         for (size_t i = 0; i < buildables.size(); ++i) {
             auto & b(buildables[i]);