aboutsummaryrefslogtreecommitdiff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-12-02 15:56:37 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-12-02 15:56:37 +0100
commite721f99817bb7154d8098c902e25f84521a90b7f (patch)
treec20de8b9520dbe0d17dea92b43a512743b615f73 /src/nix/main.cc
parent0456a4ec65071a421307d8c98cc95e56c053f7d7 (diff)
nix: Add --refresh as an alias for --tarball-ttl 0
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r--src/nix/main.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 5c0faf879..272c944ba 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -92,6 +92,11 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
.longName("no-net")
.description("disable substituters and consider all previously downloaded files up-to-date")
.handler([&]() { useNet = false; });
+
+ mkFlag()
+ .longName("refresh")
+ .description("consider all previously downloaded files out-of-date")
+ .handler([&]() { settings.tarballTtl = 0; });
}
void printFlags(std::ostream & out) override