aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_export.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-19 16:57:31 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-21 18:06:52 -0700
commit14dacd8631ae8e29c2ca85c6121a1be9fc613990 (patch)
treedf787f55b9ac506251d7fc1de8eb91dbcb5657c8 /toolsrc/src/commands_export.cpp
parentde3eda6546b97d0d0d11308a36d2adcb27224037 (diff)
downloadvcpkg-14dacd8631ae8e29c2ca85c6121a1be9fc613990.tar.gz
vcpkg-14dacd8631ae8e29c2ca85c6121a1be9fc613990.zip
`export`: Only suggest installation of unbuilt packages
Diffstat (limited to 'toolsrc/src/commands_export.cpp')
-rw-r--r--toolsrc/src/commands_export.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp
index 5348ba847..4ab01cdf9 100644
--- a/toolsrc/src/commands_export.cpp
+++ b/toolsrc/src/commands_export.cpp
@@ -87,7 +87,15 @@ namespace vcpkg::Commands::Export
if (it != group_by_plan_type.cend() && !it->second.empty())
{
System::println(System::Color::error, "There are packages that have not been built.");
- auto s = Strings::join(" ", specs, [](const PackageSpec& spec) { return spec.to_string(); });
+
+ // No need to show all of them, just the user-requested ones. Dependency resolution will handle the rest.
+ std::vector<const ExportPlanAction*> unbuilt = it->second;
+ Util::erase_remove_if(unbuilt, [](const ExportPlanAction* a)
+ {
+ return a->request_type != RequestType::USER_REQUESTED;
+ });
+
+ auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); });
System::println("To build them, run:\n"
" vcpkg install %s", s);
Checks::exit_fail(VCPKG_LINE_INFO);