Skip to content

Commit

Permalink
[vcpkg-hash] Fix target paths containing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed Feb 27, 2018
1 parent a2e6ffd commit 9eb9eca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion toolsrc/src/vcpkg/commands.hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9eb9eca

Please sign in to comment.