aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_installation.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-23 12:06:55 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-23 12:06:55 -0700
commitb2f6a769ea015f49c7061e36c8c7125dd53ca01e (patch)
tree4b0ffe20033ff206230a75936c9a500d17fbabf4 /toolsrc/src/commands_installation.cpp
parent0b59e6c0fb0b1b5f5adae6311553cd2f8fc7c6c8 (diff)
downloadvcpkg-b2f6a769ea015f49c7061e36c8c7125dd53ca01e.tar.gz
vcpkg-b2f6a769ea015f49c7061e36c8c7125dd53ca01e.zip
find_unment_dependencies() now works for a single package
Diffstat (limited to 'toolsrc/src/commands_installation.cpp')
-rw-r--r--toolsrc/src/commands_installation.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp
index b688b8d5a..0902ba525 100644
--- a/toolsrc/src/commands_installation.cpp
+++ b/toolsrc/src/commands_installation.cpp
@@ -113,14 +113,14 @@ namespace vcpkg
void build_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet)
{
- // Currently the code won't work for multiple packages if one of them depends on another.
+ // Installing multiple packages leads to unintuitive behavior if one of them depends on another.
// Allowing only 1 package for now.
args.check_max_args(1);
StatusParagraphs status_db = database_load_check(paths);
- std::vector<package_spec> specs = args.parse_all_arguments_as_package_specs(default_target_triplet);
- std::unordered_set<package_spec> unmet_dependencies = Dependencies::find_unmet_dependencies(paths, specs, status_db);
+ const package_spec spec = args.parse_all_arguments_as_package_specs(default_target_triplet).at(0);
+ std::unordered_set<package_spec> unmet_dependencies = Dependencies::find_unmet_dependencies(paths, spec, status_db);
if (!unmet_dependencies.empty())
{
System::println(System::color::error, "The build command requires all dependencies to be already installed.");
@@ -135,10 +135,7 @@ namespace vcpkg
}
Environment::ensure_utilities_on_path(paths);
- for (const package_spec& spec : specs)
- {
- build_internal(spec, paths);
- }
+ build_internal(spec, paths);
exit(EXIT_SUCCESS);
}