aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_import.cpp
diff options
context:
space:
mode:
authorTobias Kohlbau <tobias@kohlbau.de>2017-03-28 10:48:26 +0200
committerTobias Kohlbau <tobias@kohlbau.de>2017-03-28 10:51:53 +0200
commita9aaead2d19c60a51edbaaddd97b745c51714220 (patch)
treee0632fa068b11edd4be13e1ee191d65616a4cffb /toolsrc/src/commands_import.cpp
parent4fbcf0df4dd14176eda7d686bf122d0b65c0585a (diff)
parenta1cfa18481f9ea0f7eaaaeb34832d89c51f5f4f1 (diff)
downloadvcpkg-a9aaead2d19c60a51edbaaddd97b745c51714220.tar.gz
vcpkg-a9aaead2d19c60a51edbaaddd97b745c51714220.zip
Merge branch 'master' of github.com:Microsoft/vcpkg into opencv_contrib
Diffstat (limited to 'toolsrc/src/commands_import.cpp')
-rw-r--r--toolsrc/src/commands_import.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp
index 69710765f..6be5c2fe1 100644
--- a/toolsrc/src/commands_import.cpp
+++ b/toolsrc/src/commands_import.cpp
@@ -72,11 +72,11 @@ namespace vcpkg::Commands::Import
const fs::path include_directory(args.command_arguments[1]);
const fs::path project_directory(args.command_arguments[2]);
- auto pghs = Paragraphs::get_paragraphs(control_file_path);
- Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file %s for package", control_file_path.generic_string());
+ const expected<std::unordered_map<std::string, std::string>> pghs = Paragraphs::get_single_paragraph(control_file_path);
+ Checks::check_exit(VCPKG_LINE_INFO, pghs.get() != nullptr, "Invalid control file %s for package", control_file_path.generic_string());
StatusParagraph spgh;
- spgh.package = BinaryParagraph(pghs[0]);
+ spgh.package = BinaryParagraph(*pghs.get());
auto& control_file_data = spgh.package;
do_import(paths, include_directory, project_directory, control_file_data);