mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
--version: Print some config info
Such as whether Nix is built with signed binary cache support, and the location of the configuration file.
This commit is contained in:
parent
1993b10d11
commit
887bb5fa5a
3 changed files with 28 additions and 2 deletions
|
@ -1027,6 +1027,12 @@ static void opGenerateBinaryCacheKey(Strings opFlags, Strings opArgs)
|
|||
}
|
||||
|
||||
|
||||
static void opVersion(Strings opFlags, Strings opArgs)
|
||||
{
|
||||
printVersion("nix-store");
|
||||
}
|
||||
|
||||
|
||||
/* Scan the arguments; find the operation, set global flags, put all
|
||||
other flags in a list, and put all other arguments in another
|
||||
list. */
|
||||
|
@ -1044,7 +1050,7 @@ int main(int argc, char * * argv)
|
|||
if (*arg == "--help")
|
||||
showManPage("nix-store");
|
||||
else if (*arg == "--version")
|
||||
printVersion("nix-store");
|
||||
op = opVersion;
|
||||
else if (*arg == "--realise" || *arg == "--realize" || *arg == "-r")
|
||||
op = opRealise;
|
||||
else if (*arg == "--add" || *arg == "-A")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue