diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-02-26 18:25:01 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-02-26 18:25:01 -0800 |
| commit | 9eb9eca48766289b6377eb479cd5eb5f3da7441d (patch) | |
| tree | d2693bf0e7b380f3bd41b73bc5837611bf9e61d4 | |
| parent | a2e6ffd86d435f08116e5e80b04796fe6898ebd0 (diff) | |
| download | vcpkg-9eb9eca48766289b6377eb479cd5eb5f3da7441d.tar.gz vcpkg-9eb9eca48766289b6377eb479cd5eb5f3da7441d.zip | |
[vcpkg-hash] Fix target paths containing spaces
| -rw-r--r-- | toolsrc/src/vcpkg/commands.hash.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 767a1bf26..bbbbed036 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -10,7 +10,10 @@ namespace vcpkg::Commands::Hash std::string get_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type) { const std::string cmd_line = Strings::format( - R"("%s" -E %ssum %s)", cmake_exe_path.u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string()); + R"("%s" -E %ssum "%s")", + cmake_exe_path.u8string(), + Strings::ascii_to_lowercase(hash_type), + path.u8string()); const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); |
