diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index 57cde9fd09f34020a6b0823e152733410ea38758..673d1b2be5f60b0945005b83090815c1d13e25c9 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); }