aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjakobrs <jakobrs100@gmail.com>2020-03-19 19:15:55 +0100
committerjakobrs <jakobrs100@gmail.com>2020-03-19 19:41:23 +0100
commitc5a488afc05372dd46e05559ef04ac9969808507 (patch)
tree2851c21b21fe3ada898219f5e45651492e204fb3 /src
parentef74fafc0368944e6cfc3b804b4bcdddd6bcf9c0 (diff)
Remove the --delete option for --gc
Running `nix-store --gc --delete` will, as of Nix 2.3.3, simply fail because the --delete option conflicts with the --delete operation. $ nix-store --gc --delete error: only one operation may be specified Try 'nix-store --help' for more information. Furthermore, it has been broken since at least Nix 0.16 (which was released sometime in 2010), which means that any scripts which depend on it should have been broken at least nine years ago. This commit simply formally removes the option. There should be no actual difference in behaviour as far as the user is concerned: it errors with the exact same error message. The manual has been edited to remove any references to the (now gone) --delete option. Other information: * Path for Nix 0.16 used: /nix/store/rp3sgmskn0p0pj1ia2qwd5al6f6pinz4-nix-0.16
Diffstat (limited to 'src')
-rw-r--r--src/nix-store/nix-store.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 45e152c47..c14d900ae 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -577,7 +577,6 @@ static void opGC(Strings opFlags, Strings opArgs)
if (*i == "--print-roots") printRoots = true;
else if (*i == "--print-live") options.action = GCOptions::gcReturnLive;
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(), true);
options.maxFreed = maxFreed >= 0 ? maxFreed : 0;