aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-02-10 13:42:58 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-02-10 13:42:58 +0000
commit6551b36790d47477087fc3a7f7bb779f28e42d8e (patch)
treef3f81c5f39573b6e2e79bd743eb99af44e8a659a /src/nix-env/main.cc
parent0616b7feea26786c298052b0779614b2888b482a (diff)
* Print what generation we are switching to; honour --dry-run flag.
Diffstat (limited to 'src/nix-env/main.cc')
-rw-r--r--src/nix-env/main.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 57cde9fd0..673d1b2be 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -528,6 +528,11 @@ static void switchGeneration(Globals & globals, int dstGen)
else
throw Error(format("generation %1% does not exist") % dstGen);
+ printMsg(lvlInfo, format("switching from generation %1% to %2%")
+ % curGen % dst.number);
+
+ if (globals.dryRun) return;
+
switchLink(globals.profile, dst.path);
}