mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 12:06:49 +08:00
Fix signature of hashing function
This commit is contained in:
parent
1b0682a39e
commit
8bb28d0de4
@ -201,11 +201,10 @@ namespace vcpkg::Commands::Hash
|
|||||||
return split[0];
|
return split[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type)
|
std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type)
|
||||||
{
|
{
|
||||||
const std::string digest_size = get_digest_size(hash_type);
|
const std::string digest_size = get_digest_size(hash_type);
|
||||||
Checks::check_exit(
|
Checks::check_exit(VCPKG_LINE_INFO, fs.exists(path), "File %s does not exist", path.u8string());
|
||||||
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);
|
return run_shasum_and_post_process(cmd_line);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user