mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
allow spaces in pathname on linux (#7216)
This commit is contained in:
parent
f97f92785f
commit
60bff8d549
@ -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()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user