mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 14:22:54 +08:00
[vcpkg hash] formatting
This commit is contained in:
parent
bab554a8b3
commit
479ed417d9
@ -204,8 +204,7 @@ namespace vcpkg::Commands::Hash
|
||||
const std::string digest_size = get_digest_size(hash_type);
|
||||
Checks::check_exit(
|
||||
VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string());
|
||||
const std::string cmd_line = Strings::format(
|
||||
R"(shasum -a %s "%s")", digest_size, path.u8string());
|
||||
const std::string cmd_line = Strings::format(R"(shasum -a %s "%s")", digest_size, path.u8string());
|
||||
return run_shasum_and_post_process(cmd_line);
|
||||
}
|
||||
|
||||
@ -214,8 +213,7 @@ namespace vcpkg::Commands::Hash
|
||||
const std::string digest_size = get_digest_size(hash_type);
|
||||
verify_has_only_allowed_chars(s);
|
||||
|
||||
const std::string cmd_line = Strings::format(
|
||||
R"(echo -n "%s" | shasum -a %s)", s, digest_size);
|
||||
const std::string cmd_line = Strings::format(R"(echo -n "%s" | shasum -a %s)", s, digest_size);
|
||||
return run_shasum_and_post_process(cmd_line);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user