mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
Formatting
This commit is contained in:
parent
e1f5fe728d
commit
a715caf5fd
@ -119,20 +119,20 @@ namespace vcpkg::Commands::Remove
|
|||||||
std::vector<const RemovePlanAction*> cont = it->second;
|
std::vector<const RemovePlanAction*> cont = it->second;
|
||||||
std::sort(cont.begin(), cont.end(), &RemovePlanAction::compare_by_name);
|
std::sort(cont.begin(), cont.end(), &RemovePlanAction::compare_by_name);
|
||||||
const std::string as_string = Strings::join("\n", cont, [](const RemovePlanAction* p)
|
const std::string as_string = Strings::join("\n", cont, [](const RemovePlanAction* p)
|
||||||
{
|
{
|
||||||
return Dependencies::to_output_string(p->request_type, p->spec.to_string());
|
return Dependencies::to_output_string(p->request_type, p->spec.to_string());
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (plan_type)
|
switch (plan_type)
|
||||||
{
|
{
|
||||||
case RemovePlanType::NOT_INSTALLED:
|
case RemovePlanType::NOT_INSTALLED:
|
||||||
System::println("The following packages are not installed, so not removed:\n%s", as_string);
|
System::println("The following packages are not installed, so not removed:\n%s", as_string);
|
||||||
continue;
|
continue;
|
||||||
case RemovePlanType::REMOVE:
|
case RemovePlanType::REMOVE:
|
||||||
System::println("The following packages will be removed:\n%s", as_string);
|
System::println("The following packages will be removed:\n%s", as_string);
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
Checks::unreachable(VCPKG_LINE_INFO);
|
Checks::unreachable(VCPKG_LINE_INFO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -179,9 +179,9 @@ namespace vcpkg::Commands::Remove
|
|||||||
print_plan(remove_plan);
|
print_plan(remove_plan);
|
||||||
|
|
||||||
const bool has_non_user_requested_packages = Util::find_if(remove_plan, [](const RemovePlanAction& package)-> bool
|
const bool has_non_user_requested_packages = Util::find_if(remove_plan, [](const RemovePlanAction& package)-> bool
|
||||||
{
|
{
|
||||||
return package.request_type != RequestType::USER_REQUESTED;
|
return package.request_type != RequestType::USER_REQUESTED;
|
||||||
}) != remove_plan.cend();
|
}) != remove_plan.cend();
|
||||||
|
|
||||||
if (has_non_user_requested_packages)
|
if (has_non_user_requested_packages)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user