From 6551b36790d47477087fc3a7f7bb779f28e42d8e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Feb 2004 13:42:58 +0000 Subject: * Print what generation we are switching to; honour --dry-run flag. --- src/nix-env/main.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nix-env') diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index 57cde9fd09f3..673d1b2be5f6 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); } -- cgit 1.4.1