aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorFishhh <hubert.gluchowski19@gmail.com>2022-06-20 18:00:32 +0200
committerFishhh <hubert.gluchowski19@gmail.com>2022-06-20 18:00:32 +0200
commit4ade8a5f25a32cdf591ea369318d9d256e49025a (patch)
treef0932ff62b65c3b1c2da82db26cc96554d7e3777 /src/nix
parent7e301fd74e929af916116a04d84e130f9e0112de (diff)
Fix arity of `--exclude` flag in `nix search`
Due to incorrectly using the Handler(vector<string>*) constructor the `--exclude` flag would swallow all proceeding arguments instead of just one.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/search.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix/search.cc b/src/nix/search.cc
index f1f5f9641..bdd45cbed 100644
--- a/src/nix/search.cc
+++ b/src/nix/search.cc
@@ -34,7 +34,9 @@ struct CmdSearch : InstallableCommand, MixJSON
.shortName = 'e',
.description = "Hide packages whose attribute path, name or description contain *regex*.",
.labels = {"regex"},
- .handler = Handler(&excludeRes),
+ .handler = {[this](std::string s) {
+ excludeRes.push_back(s);
+ }},
});
}