mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 11:07:10 +01:00
[vcpkg] Handle missing fields in print_error_message()
This commit is contained in:
parent
8741214bf6
commit
befe2531f6
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user