about summary refs log tree commit diff
path: root/src/nix-store
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-17T13·48+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-17T13·48+0100
commit1da6ae4f9904f7e09166085a2cfed8887e0e86d4 (patch)
tree9e126907178d7627e02114cb7137256de1996592 /src/nix-store
parent00d30496ca32145f55891364ddcf3d4af87f05d5 (diff)
nix-store --gc --max-freed: Support a unit specifier
E.g. "--max-freed 10G" means "free ten gigabytes".
Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/nix-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 365ffa19a0d8..e969a3b71e33 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -619,7 +619,7 @@ static void opGC(Strings opFlags, Strings opArgs)
         else if (*i == "--print-dead") options.action = GCOptions::gcReturnDead;
         else if (*i == "--delete") options.action = GCOptions::gcDeleteDead;
         else if (*i == "--max-freed") {
-            long long maxFreed = getIntArg<long long>(*i, i, opFlags.end());
+            long long maxFreed = getIntArg<long long>(*i, i, opFlags.end(), true);
             options.maxFreed = maxFreed >= 0 ? maxFreed : 0;
         }
         else throw UsageError(format("bad sub-operation `%1%' in GC") % *i);