about summary refs log tree commit diff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env/nix-env.cc')
-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);