mirror of
https://github.com/NixOS/nix
synced 2025-07-05 12:21:48 +02:00
nix-store --gc: Make ‘--max-freed 0’ do the right thing
That is, delete almost nothing (it will still remove unused links from /nix/store/.links).
This commit is contained in:
parent
1df702d347
commit
967d066d8e
4 changed files with 6 additions and 7 deletions
|
@ -583,7 +583,7 @@ static void opGC(Strings opFlags, Strings opArgs)
|
|||
else if (*i == "--delete") options.action = GCOptions::gcDeleteDead;
|
||||
else if (*i == "--max-freed") {
|
||||
long long maxFreed = getIntArg<long long>(*i, i, opFlags.end());
|
||||
options.maxFreed = maxFreed >= 1 ? maxFreed : 1;
|
||||
options.maxFreed = maxFreed >= 0 ? maxFreed : 0;
|
||||
}
|
||||
else throw UsageError(format("bad sub-operation `%1%' in GC") % *i);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue