diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-06-20 09:53:22 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-06-20 09:53:22 -0700 |
| commit | befe2531f620471e1b2c5562c9994420e03c008a (patch) | |
| tree | b3d9e44efec288abd817084836948362822ea091 /toolsrc/src/SourceParagraph.cpp | |
| parent | 8741214bf69d1209a1e6d405ed8561d27f04436a (diff) | |
| download | vcpkg-befe2531f620471e1b2c5562c9994420e03c008a.tar.gz vcpkg-befe2531f620471e1b2c5562c9994420e03c008a.zip | |
[vcpkg] Handle missing fields in print_error_message()
Diffstat (limited to 'toolsrc/src/SourceParagraph.cpp')
| -rw-r--r-- | toolsrc/src/SourceParagraph.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 83b8e2e2d..9289edb38 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -56,7 +56,7 @@ namespace vcpkg System::println(System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", error_info->name); - System::println("The following fields were not expected:\n\n %s\n\n", + System::println("The following fields were not expected:\n\n %s\n", Strings::join("\n ", error_info->extra_fields)); have_remaining_fields = true; } @@ -68,6 +68,18 @@ namespace vcpkg Strings::join("\n ", get_list_of_valid_fields())); System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); } + + for (auto&& error_info : error_info_list) + { + if (!error_info->missing_fields.empty()) + { + System::println(System::Color::error, + "Error: There are missing fields in the Source Paragraphs of %s", + error_info->name); + System::println("The following fields were missing:\n\n %s\n", + Strings::join("\n ", error_info->missing_fields)); + } + } } static ParseExpected<SourceParagraph> parse_source_paragraph(RawParagraph&& fields) |
