[vcpkg] Handle missing fields in print_error_message()

This commit is contained in:
Robert Schumacher 2017-06-20 09:53:22 -07:00
parent 8741214bf6
commit befe2531f6

View File

@ -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)