Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] allow spaces in pathname on linux #7216

Merged
merged 1 commit into from
Jul 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions toolsrc/src/vcpkg/base/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ namespace vcpkg::Hash
static std::string parse_shasum_output(const std::string& shasum_output)
{
std::vector<std::string> split = Strings::split(shasum_output, " ");
// Checking if >= 3 because filenames with spaces will show up as multiple tokens.
// The hash is the first token so we don't need to parse the filename anyway.
Checks::check_exit(VCPKG_LINE_INFO,
split.size() == 3,
"Expected output of the form [hash filename\n] (3 tokens), but got\n"
split.size() >= 3,
"Expected output of the form [hash filename\n] (3+ tokens), but got\n"
"[%s] (%s tokens)",
shasum_output,
std::to_string(split.size()));
Expand Down