diff options
| author | Tobias Kohlbau <tobias@kohlbau.de> | 2017-03-28 10:48:26 +0200 |
|---|---|---|
| committer | Tobias Kohlbau <tobias@kohlbau.de> | 2017-03-28 10:51:53 +0200 |
| commit | a9aaead2d19c60a51edbaaddd97b745c51714220 (patch) | |
| tree | e0632fa068b11edd4be13e1ee191d65616a4cffb /toolsrc/src/PostBuildLint_BuildInfo.cpp | |
| parent | 4fbcf0df4dd14176eda7d686bf122d0b65c0585a (diff) | |
| parent | a1cfa18481f9ea0f7eaaaeb34832d89c51f5f4f1 (diff) | |
| download | vcpkg-a9aaead2d19c60a51edbaaddd97b745c51714220.tar.gz vcpkg-a9aaead2d19c60a51edbaaddd97b745c51714220.zip | |
Merge branch 'master' of github.com:Microsoft/vcpkg into opencv_contrib
Diffstat (limited to 'toolsrc/src/PostBuildLint_BuildInfo.cpp')
| -rw-r--r-- | toolsrc/src/PostBuildLint_BuildInfo.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/toolsrc/src/PostBuildLint_BuildInfo.cpp b/toolsrc/src/PostBuildLint_BuildInfo.cpp index 5b475322a..7b7751e66 100644 --- a/toolsrc/src/PostBuildLint_BuildInfo.cpp +++ b/toolsrc/src/PostBuildLint_BuildInfo.cpp @@ -39,10 +39,8 @@ namespace vcpkg::PostBuildLint BuildInfo read_build_info(const fs::path& filepath) { - const std::vector<std::unordered_map<std::string, std::string>> pghs = Paragraphs::get_paragraphs(filepath); - Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid BUILD_INFO file for package"); - - return BuildInfo::create(pghs[0]); + const expected<std::unordered_map<std::string, std::string>> pghs = Paragraphs::get_single_paragraph(filepath); + Checks::check_exit(VCPKG_LINE_INFO, pghs.get() != nullptr, "Invalid BUILD_INFO file for package"); + return BuildInfo::create(*pghs.get()); } - } |
