diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-10-02 14:57:52 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-10-02 14:57:52 -0700 |
| commit | d25a072c76ff81934813f20116788140621619ba (patch) | |
| tree | df92a30327c6ecb0664c96afebdaa0433cf443db /toolsrc/src/commands_search.cpp | |
| parent | e4e5298911059837652824d47bce1e964305c72d (diff) | |
| download | vcpkg-d25a072c76ff81934813f20116788140621619ba.tar.gz vcpkg-d25a072c76ff81934813f20116788140621619ba.zip | |
Show warning instead of failing if port cannot be parsed
Diffstat (limited to 'toolsrc/src/commands_search.cpp')
| -rw-r--r-- | toolsrc/src/commands_search.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 1ccec9fbe..d35a546c4 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -87,27 +87,8 @@ namespace vcpkg::Commands::Search const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); - auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - if (!sources_and_errors.errors.empty()) - { - if (GlobalState::debugging) - { - print_error_message(sources_and_errors.errors); - } - else - { - for (auto&& error : sources_and_errors.errors) - { - System::println( - System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name); - } - System::println(System::Color::warning, - "Use '--debug' to get more information about the parse failures.\n"); - } - } - - auto& source_paragraphs = sources_and_errors.paragraphs; if (options.find(OPTION_GRAPH) != options.cend()) { const std::string graph_as_string = create_graph_as_string(source_paragraphs); |
