diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23 14:19:49 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23 14:38:00 +0200 |
commit | 887bb5fa5a5a7b8b91d371de1a5c8280f9505744 (patch) | |
tree | 2486f49317aded421a8a33d692960651fff8a437 /src/nix-store | |
parent | 1993b10d1169b04b83443a9ef5d4e3e38667afeb (diff) |
--version: Print some config info
Such as whether Nix is built with signed binary cache support, and the
location of the configuration file.
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 039fbe4cb..d541b7b7d 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -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") |