diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-08-28 17:26:01 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-08-28 17:26:01 -0700 |
| commit | 5b42ec9b5d7277d9a4452c4c3a109770d9437205 (patch) | |
| tree | f589eacc23fcb459c00232852fa98401f65d082e | |
| parent | 581aea74fb9737ee1efb0ae5d662ede8268b8e49 (diff) | |
| download | vcpkg-5b42ec9b5d7277d9a4452c4c3a109770d9437205.tar.gz vcpkg-5b42ec9b5d7277d9a4452c4c3a109770d9437205.zip | |
[vcpkg] Hack to fix codepage problems -- root cause unknown
| -rw-r--r-- | toolsrc/src/VcpkgPaths.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 1b76fdc24..4bceff784 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -264,7 +264,14 @@ namespace vcpkg const std::wstring cmd = System::create_powershell_script_cmd(script); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances"); - return Strings::split(ec_data.output, "\n"); + return Util::fmap(Strings::split(ec_data.output, "\n"), [](const std::string& line) { + auto colon_pos = line.find(':'); + if (colon_pos != std::string::npos && colon_pos > 0) + { + return line.substr(colon_pos - 1); + } + return line; + }); } static Optional<fs::path> get_VS2015_installation_instance() |
