aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/cmd_search.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-14 18:13:34 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-14 18:13:34 +0000
commit3a6bcd7033c526aca5d2e6d94b5cf688c11013e6 (patch)
tree489727c42f4cda0479e36703aa67fb24821e2333 /src/clients/cave/cmd_search.cc
parent1159e9fd770b98a8aa2cd2e505ef7fc8f899390c (diff)
downloadpaludis-3a6bcd7033c526aca5d2e6d94b5cf688c11013e6.tar.gz
paludis-3a6bcd7033c526aca5d2e6d94b5cf688c11013e6.tar.xz
Don't stop searching after a broken package
Diffstat (limited to 'src/clients/cave/cmd_search.cc')
-rw-r--r--src/clients/cave/cmd_search.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/clients/cave/cmd_search.cc b/src/clients/cave/cmd_search.cc
index de06f763e..dd8476d6e 100644
--- a/src/clients/cave/cmd_search.cc
+++ b/src/clients/cave/cmd_search.cc
@@ -278,6 +278,8 @@ SearchCommand::run(
if (cmdline.begin_parameters() == cmdline.end_parameters())
throw args::DoHelp("search requires at least one parameter");
+ int retcode(0);
+
const std::shared_ptr<Sequence<std::string> > show_args(std::make_shared<Sequence<std::string>>());
std::string name_description_substring_hint;
@@ -311,7 +313,7 @@ SearchCommand::run(
MatchCommand match_command;
std::shared_ptr<Set<QualifiedPackageName> > matches(std::make_shared<Set<QualifiedPackageName>>());
- find_candidates_command.run_hosted(env, cmdline.search_options, cmdline.match_options,
+ retcode |= find_candidates_command.run_hosted(env, cmdline.search_options, cmdline.match_options,
cmdline.index_options, name_description_substring_hint, std::bind(
&found_candidate, env, std::ref(match_command), std::cref(cmdline.match_options),
std::placeholders::_1, patterns, std::function<void (const PackageDepSpec &)>(std::bind(
@@ -346,7 +348,7 @@ SearchCommand::run(
show_args->push_back("--description-keys");
ShowCommand show_command;
- return show_command.run(env, show_args);
+ return show_command.run(env, show_args) | retcode;
}
std::shared_ptr<args::ArgsHandler>