mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 17:19:00 +08:00
Swap parameters of Build::create_error_message()
This commit is contained in:
parent
c432b66034
commit
6e25bcf7cb
@ -22,7 +22,7 @@ namespace vcpkg::Commands
|
||||
};
|
||||
|
||||
const std::string& to_string(const BuildResult build_result);
|
||||
std::string create_error_message(const std::string& package_id, const BuildResult build_result);
|
||||
std::string create_error_message(const BuildResult build_result, const std::string& package_id);
|
||||
|
||||
BuildResult build_package(const SourceParagraph& source_paragraph, const package_spec& spec, const vcpkg_paths& paths, const fs::path& port_dir, const StatusParagraphs& status_db);
|
||||
void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet);
|
||||
|
@ -103,7 +103,7 @@ namespace vcpkg::Commands::Build
|
||||
}
|
||||
}
|
||||
|
||||
std::string create_error_message(const std::string& package_id, const BuildResult build_result)
|
||||
std::string create_error_message(const BuildResult build_result, const std::string& package_id)
|
||||
{
|
||||
return Strings::format("Error: Building package %s failed with: %s", package_id, Build::to_string(build_result));
|
||||
}
|
||||
@ -164,7 +164,7 @@ namespace vcpkg::Commands::Build
|
||||
|
||||
if (result != BuildResult::SUCCEEDED)
|
||||
{
|
||||
System::println(System::color::error, Build::create_error_message(spec.toString(), result));
|
||||
System::println(System::color::error, Build::create_error_message(result, spec.toString()));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace vcpkg::Commands::BuildExternal
|
||||
const Build::BuildResult result = Commands::Build::build_package(*spgh, *spec, paths, port_dir, status_db);
|
||||
if (result != Build::BuildResult::SUCCEEDED)
|
||||
{
|
||||
System::println(System::color::error, Build::create_error_message(spec->toString(), result));
|
||||
System::println(System::color::error, Build::create_error_message(result, spec->toString()));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ namespace vcpkg::Commands::CI
|
||||
results.push_back(result);
|
||||
if (result != Build::BuildResult::SUCCEEDED)
|
||||
{
|
||||
System::println(System::color::error, Build::create_error_message(action.spec.toString(), result));
|
||||
System::println(System::color::error, Build::create_error_message(result, action.spec.toString()));
|
||||
continue;
|
||||
}
|
||||
const BinaryParagraph bpgh = try_load_cached_package(paths, action.spec).get_or_throw();
|
||||
|
@ -217,7 +217,7 @@ namespace vcpkg::Commands::Install
|
||||
const Build::BuildResult result = Commands::Build::build_package(*action.plan.source_pgh, action.spec, paths, paths.port_dir(action.spec), status_db);
|
||||
if (result != Build::BuildResult::SUCCEEDED)
|
||||
{
|
||||
System::println(System::color::error, Build::create_error_message(action.spec.toString(), result));
|
||||
System::println(System::color::error, Build::create_error_message(result, action.spec.toString()));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
const BinaryParagraph bpgh = try_load_cached_package(paths, action.spec).get_or_throw();
|
||||
|
Loading…
Reference in New Issue
Block a user