about summary refs log tree commit diff
path: root/src/nix-collect-garbage/nix-collect-garbage.cc
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-05-05T23·43-0700
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-06T09·02+0200
commit0705d04dfab60b0c98fbd170b9cc3fcd073918bb (patch)
tree147a2b6b5d49d9b3f0320165b3bdc39bd8dc39dd /src/nix-collect-garbage/nix-collect-garbage.cc
parent9451ef3731904090d7c8476137960a3fb9d4679d (diff)
nix-collect-garbage: Fix deleting old generations
The call to nix-env expects a string which represents how old the
derivations are or just "old" which means any generations other than
the current one in use. Currently nix-collect-garbage passes an empty
string to nix-env when using the -d option. This patch corrects the call
to nix-env such that it follows the old behavior.
Diffstat (limited to 'src/nix-collect-garbage/nix-collect-garbage.cc')
-rw-r--r--src/nix-collect-garbage/nix-collect-garbage.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-collect-garbage/nix-collect-garbage.cc b/src/nix-collect-garbage/nix-collect-garbage.cc
index 568a1fa7daa4..366a378a1138 100644
--- a/src/nix-collect-garbage/nix-collect-garbage.cc
+++ b/src/nix-collect-garbage/nix-collect-garbage.cc
@@ -6,7 +6,7 @@
 
 using namespace nix;
 
-std::string gen = "";
+std::string gen = "old";
 bool dryRun = false;
 
 void runProgramSimple(Path program, const Strings & args)