mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
parent
99c8e7a48d
commit
5bbe793abf
1 changed files with 5 additions and 1 deletions
|
@ -55,6 +55,7 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
|
|||
{
|
||||
bool printBuildLogs = false;
|
||||
bool useNet = true;
|
||||
bool refresh = false;
|
||||
|
||||
NixArgs() : MultiCommand(*RegisterCommand::commands), MixCommonArgs("nix")
|
||||
{
|
||||
|
@ -96,7 +97,7 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
|
|||
mkFlag()
|
||||
.longName("refresh")
|
||||
.description("consider all previously downloaded files out-of-date")
|
||||
.handler([&]() { settings.tarballTtl = 0; });
|
||||
.handler([&]() { refresh = true; });
|
||||
}
|
||||
|
||||
void printFlags(std::ostream & out) override
|
||||
|
@ -182,6 +183,9 @@ void mainWrapped(int argc, char * * argv)
|
|||
downloadSettings.connectTimeout = 1;
|
||||
}
|
||||
|
||||
if (args.refresh)
|
||||
settings.tarballTtl = 0;
|
||||
|
||||
args.command->prepare();
|
||||
args.command->run();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue