diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-03-24 10:46:49 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-03-27 12:43:14 -0700 |
| commit | d2bab3c370fca9fa5216d97495810faaeeaebc2d (patch) | |
| tree | 205fd2130c93e9fe40975a271dd11381b562fead /toolsrc/src/vcpkglib.cpp | |
| parent | 90bb4a2eeb316fbc5055d507044229cbc8bc5337 (diff) | |
| download | vcpkg-d2bab3c370fca9fa5216d97495810faaeeaebc2d.tar.gz vcpkg-d2bab3c370fca9fa5216d97495810faaeeaebc2d.zip | |
Rework Paragraph parsing error handling. Add single paragraph functions
Diffstat (limited to 'toolsrc/src/vcpkglib.cpp')
| -rw-r--r-- | toolsrc/src/vcpkglib.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index 932502d2d..204e1c0d7 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -22,8 +22,7 @@ namespace vcpkg fs::rename(vcpkg_dir_status_file_old, vcpkg_dir_status_file); } - auto text = Files::read_contents(vcpkg_dir_status_file).get_or_throw(VCPKG_LINE_INFO); - auto pghs = Paragraphs::parse_paragraphs(text); + auto pghs = Paragraphs::get_paragraphs(vcpkg_dir_status_file).get_or_throw(VCPKG_LINE_INFO); std::vector<std::unique_ptr<StatusParagraph>> status_pghs; for (auto&& p : pghs) @@ -65,8 +64,7 @@ namespace vcpkg if (b->path().filename() == "incomplete") continue; - auto text = Files::read_contents(b->path()).get_or_throw(VCPKG_LINE_INFO); - auto pghs = Paragraphs::parse_paragraphs(text); + auto pghs = Paragraphs::get_paragraphs(b->path()).get_or_throw(VCPKG_LINE_INFO); for (auto&& p : pghs) { current_status_db.insert(std::make_unique<StatusParagraph>(p)); |
