about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-08-04T13·11+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-08-04T13·11+0000
commit5b1052663a35940fc99ae6a8fcf6e707ae939fef (patch)
tree2603914e967a626be5499310448906421d604f5f /src
parentc4f98941ed7e5e07786d92fc0be4435878f9b3cd (diff)
* Always show what paths we're going to build/download (as in
  --dry-run).  Maybe there should be an option to turn this on/off?

Diffstat (limited to 'src')
-rw-r--r--src/nix-env/nix-env.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 085d83a5b98a..c3fe2d08969b 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -617,11 +617,10 @@ static void installDerivations(Globals & globals,
     for (DrvInfos::iterator i = newElems.begin(); i != newElems.end(); ++i)
         printMsg(lvlInfo,
             format("installing `%1%'") % i->name);
-        
-    if (globals.dryRun) {
-        printMissing(globals.state, newElems);
-        return;
-    }
+    
+    printMissing(globals.state, newElems);
+    
+    if (globals.dryRun) return;
 
     createUserEnv(globals.state, allElems,
         profile, globals.keepDerivations);
@@ -721,10 +720,9 @@ static void upgradeDerivations(Globals & globals,
         } else newElems.push_back(*i);
     }
     
-    if (globals.dryRun) {
-        printMissing(globals.state, newElems);
-        return;
-    }
+    printMissing(globals.state, newElems);
+    
+    if (globals.dryRun) return;
 
     createUserEnv(globals.state, newElems,
         globals.profile, globals.keepDerivations);