aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/nix-store.cc8
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")