diff --git a/include/vcpkg/base/messages.h b/include/vcpkg/base/messages.h index bc36fd0fee..53d89f5328 100644 --- a/include/vcpkg/base/messages.h +++ b/include/vcpkg/base/messages.h @@ -254,10 +254,12 @@ namespace vcpkg::msg DECLARE_MSG_ARG(row, "42"); DECLARE_MSG_ARG(spec, "zlib:x64-windows"); DECLARE_MSG_ARG(system_name, "Darwin"); + DECLARE_MSG_ARG(tool_name, "aria2"); DECLARE_MSG_ARG(triplet, "x64-windows"); DECLARE_MSG_ARG(url, "https://github.com/microsoft/vcpkg"); - DECLARE_MSG_ARG(version, "1.3.8"); DECLARE_MSG_ARG(vcpkg_line_info, "/a/b/foo.cpp(13)"); + DECLARE_MSG_ARG(vendor, "Azure"); + DECLARE_MSG_ARG(version, "1.3.8"); #undef DECLARE_MSG_ARG // These are `...` instead of diff --git a/locales/messages.en.json b/locales/messages.en.json index eda81d97de..d9d42042e0 100644 --- a/locales/messages.en.json +++ b/locales/messages.en.json @@ -6,10 +6,7 @@ "AddTripletExpressionNotAllowed": "Error: triplet expressions are not allowed here. You may want to change `{package_name}:{triplet}` to `{package_name}` instead.", "AllFormatArgsRawArgument": "format string \"{value}\" contains a raw format argument", "AllFormatArgsUnbalancedBraces": "unbalanced brace in format string \"{value}\"", - "AwsAttemptingToFetchPackages": "Attempting to fetch {count} packages from AWS", - "AwsFailedToDownload": "aws failed to download with exit code: {exit_code}", - "AwsRestoredPackages": "Restored {count} packages from AWS servers in {elapsed}", - "AwsUploadedPackages": "Uploaded binaries to {count} AWS servers", + "AttemptingToFetchPackagesFromVendor": "Attempting to fetch {count} package(s) from {vendor}", "BothYesAndNoOptionSpecifiedError": "error: cannot specify both --no-{option} and --{option}.", "BuildResultBuildFailed": "BUILD_FAILED", "BuildResultCacheMissing": "CACHE_MISSING", @@ -87,9 +84,11 @@ "MsiexecFailedToExtract": "msiexec failed while extracting '{path}' with launch or exit code {exit_code} and message:", "NoLocalizationForMessages": "No localization for the following messages:", "NoteMessage": "note: ", + "ObjectStorageToolFailed": "{tool_name} failed with exit code: {exit_code}", "ProcessorArchitectureMalformed": "Failed to parse %PROCESSOR_ARCHITECTURE% ({arch}) as a valid CPU architecture.", "ProcessorArchitectureMissing": "The required environment variable %PROCESSOR_ARCHITECTURE% is missing.", "ProcessorArchitectureW6432Malformed": "Failed to parse %PROCESSOR_ARCHITEW6432% ({arch}) as a valid CPU architecture. Falling back to %PROCESSOR_ARCHITECTURE%.", + "RestoredPackagesFromVendor": "Restored {count} package(s) from {vendor} in {elapsed}", "ResultsHeader": "RESULTS", "ResultsLine": " {spec}: {build_result}: {elapsed}", "SeeURL": "See {url} for more information.", @@ -97,6 +96,7 @@ "UnknownBaselineFileContent": "unrecognizable baseline entry; expected 'port:triplet=(fail|skip)'", "UnsupportedSystemName": "Error: Could not map VCPKG_CMAKE_SYSTEM_NAME '{system_name}' to a vcvarsall platform. Supported system names are '', 'Windows' and 'WindowsStore'.", "UnsupportedToolchain": "Error: in triplet {triplet}: Unable to find a valid toolchain combination.\n The requested target architecture was {arch}\n The selected Visual Studio instance is at {path}\n The available toolchain combinations are {list}\n", + "UploadedPackagesToVendor": "Uploaded {count} package(s) to {vendor} in {elapsed}", "UsingManifestAt": "Using manifest file at {path}.", "Utf8DecoderDereferencedAtEof": "dereferenced Utf8Decoder at the end of a string.", "VSExaminedInstances": "The following Visual Studio instances were considered:", diff --git a/locales/messages.json b/locales/messages.json index 50b803ca4c..679e0807dc 100644 --- a/locales/messages.json +++ b/locales/messages.json @@ -12,14 +12,8 @@ "_AllFormatArgsRawArgument.comment": "example of {value} is 'foo {} bar'\n", "AllFormatArgsUnbalancedBraces": "unbalanced brace in format string \"{value}\"", "_AllFormatArgsUnbalancedBraces.comment": "example of {value} is 'foo bar {'\n", - "AwsAttemptingToFetchPackages": "Attempting to fetch {count} packages from AWS", - "_AwsAttemptingToFetchPackages.comment": "example of {count} is '42'.\n", - "AwsFailedToDownload": "aws failed to download with exit code: {exit_code}", - "_AwsFailedToDownload.comment": "example of {exit_code} is '127'.\n", - "AwsRestoredPackages": "Restored {count} packages from AWS servers in {elapsed}", - "_AwsRestoredPackages.comment": "example of {count} is '42'.\nexample of {elapsed} is '3.532 min'.\n", - "AwsUploadedPackages": "Uploaded binaries to {count} AWS servers", - "_AwsUploadedPackages.comment": "example of {count} is '42'.\n", + "AttemptingToFetchPackagesFromVendor": "Attempting to fetch {count} package(s) from {vendor}", + "_AttemptingToFetchPackagesFromVendor.comment": "example of {count} is '42'.\nexample of {vendor} is 'Azure'.\n", "BothYesAndNoOptionSpecifiedError": "error: cannot specify both --no-{option} and --{option}.", "_BothYesAndNoOptionSpecifiedError.comment": "example of {option} is 'editable'.\n", "BuildResultBuildFailed": "BUILD_FAILED", @@ -145,11 +139,15 @@ "_MsiexecFailedToExtract.comment": "example of {path} is '/foo/bar'.\nexample of {exit_code} is '127'.\n", "NoLocalizationForMessages": "No localization for the following messages:", "NoteMessage": "note: ", + "ObjectStorageToolFailed": "{tool_name} failed with exit code: {exit_code}", + "_ObjectStorageToolFailed.comment": "example of {exit_code} is '127'.\nexample of {tool_name} is 'aria2'.\n", "ProcessorArchitectureMalformed": "Failed to parse %PROCESSOR_ARCHITECTURE% ({arch}) as a valid CPU architecture.", "_ProcessorArchitectureMalformed.comment": "example of {arch} is 'x64'.\n", "ProcessorArchitectureMissing": "The required environment variable %PROCESSOR_ARCHITECTURE% is missing.", "ProcessorArchitectureW6432Malformed": "Failed to parse %PROCESSOR_ARCHITEW6432% ({arch}) as a valid CPU architecture. Falling back to %PROCESSOR_ARCHITECTURE%.", "_ProcessorArchitectureW6432Malformed.comment": "example of {arch} is 'x64'.\n", + "RestoredPackagesFromVendor": "Restored {count} package(s) from {vendor} in {elapsed}", + "_RestoredPackagesFromVendor.comment": "example of {count} is '42'.\nexample of {elapsed} is '3.532 min'.\nexample of {vendor} is 'Azure'.\n", "ResultsHeader": "RESULTS", "_ResultsHeader.comment": "Displayed before a list of installation results.\n", "ResultsLine": " {spec}: {build_result}: {elapsed}", @@ -163,6 +161,8 @@ "_UnsupportedSystemName.comment": "example of {system_name} is 'Darwin'.\n", "UnsupportedToolchain": "Error: in triplet {triplet}: Unable to find a valid toolchain combination.\n The requested target architecture was {arch}\n The selected Visual Studio instance is at {path}\n The available toolchain combinations are {list}\n", "_UnsupportedToolchain.comment": "example for {list} is 'x86, arm64'\nexample of {triplet} is 'x64-windows'.\nexample of {arch} is 'x64'.\nexample of {path} is '/foo/bar'.\n", + "UploadedPackagesToVendor": "Uploaded {count} package(s) to {vendor} in {elapsed}", + "_UploadedPackagesToVendor.comment": "example of {count} is '42'.\nexample of {elapsed} is '3.532 min'.\nexample of {vendor} is 'Azure'.\n", "UsingManifestAt": "Using manifest file at {path}.", "_UsingManifestAt.comment": "example of {path} is '/foo/bar'.\n", "Utf8DecoderDereferencedAtEof": "dereferenced Utf8Decoder at the end of a string.", diff --git a/src/vcpkg/binarycaching.cpp b/src/vcpkg/binarycaching.cpp index e2684d5f30..5afcc4d051 100644 --- a/src/vcpkg/binarycaching.cpp +++ b/src/vcpkg/binarycaching.cpp @@ -25,19 +25,22 @@ using namespace vcpkg; namespace { - DECLARE_AND_REGISTER_MESSAGE(AwsFailedToDownload, - (msg::exit_code), + DECLARE_AND_REGISTER_MESSAGE(ObjectStorageToolFailed, + (msg::exit_code, msg::tool_name), "", - "aws failed to download with exit code: {exit_code}"); - DECLARE_AND_REGISTER_MESSAGE(AwsAttemptingToFetchPackages, - (msg::count), + "{tool_name} failed with exit code: {exit_code}"); + DECLARE_AND_REGISTER_MESSAGE(AttemptingToFetchPackagesFromVendor, + (msg::count, msg::vendor), "", - "Attempting to fetch {count} packages from AWS"); - DECLARE_AND_REGISTER_MESSAGE(AwsRestoredPackages, - (msg::count, msg::elapsed), + "Attempting to fetch {count} package(s) from {vendor}"); + DECLARE_AND_REGISTER_MESSAGE(RestoredPackagesFromVendor, + (msg::count, msg::elapsed, msg::vendor), "", - "Restored {count} packages from AWS servers in {elapsed}"); - DECLARE_AND_REGISTER_MESSAGE(AwsUploadedPackages, (msg::count), "", "Uploaded binaries to {count} AWS servers"); + "Restored {count} package(s) from {vendor} in {elapsed}"); + DECLARE_AND_REGISTER_MESSAGE(UploadedPackagesToVendor, + (msg::count, msg::elapsed, msg::vendor), + "", + "Uploaded {count} package(s) to {vendor} in {elapsed}"); struct ConfigSegmentsParser : ParserBase { @@ -916,52 +919,16 @@ namespace bool m_use_nuget_cache; }; - bool gsutil_stat(const std::string& url) - { - Command cmd; - cmd.string_arg("gsutil").string_arg("-q").string_arg("stat").string_arg(url); - const auto res = cmd_execute(cmd); - return res == 0; - } - - bool gsutil_upload_file(const std::string& gcs_object, const Path& archive) + struct ObjectStorageProvider : IBinaryProvider { - Command cmd; - cmd.string_arg("gsutil").string_arg("-q").string_arg("cp").string_arg(archive).string_arg(gcs_object); - const auto out = cmd_execute_and_capture_output(cmd); - if (out.exit_code == 0) - { - return true; - } - - print2(Color::warning, "gsutil failed to upload with exit code: ", out.exit_code, '\n', out.output); - return false; - } - - bool gsutil_download_file(const std::string& gcs_object, const Path& archive) - { - Command cmd; - cmd.string_arg("gsutil").string_arg("-q").string_arg("cp").string_arg(gcs_object).string_arg(archive); - const auto out = cmd_execute_and_capture_output(cmd); - if (out.exit_code == 0) - { - return true; - } - - print2(Color::warning, "gsutil failed to download with exit code: ", out.exit_code, '\n', out.output); - return false; - } - - struct GcsBinaryProvider : IBinaryProvider - { - GcsBinaryProvider(const VcpkgPaths& paths, - std::vector&& read_prefixes, - std::vector&& write_prefixes) + ObjectStorageProvider(const VcpkgPaths& paths, + std::vector&& read_prefixes, + std::vector&& write_prefixes) : paths(paths), m_read_prefixes(std::move(read_prefixes)), m_write_prefixes(std::move(write_prefixes)) { } - static std::string make_gcs_path(const std::string& prefix, const std::string& abi) + static std::string make_object_path(const std::string& prefix, const std::string& abi) { return Strings::concat(prefix, abi, ".zip"); } @@ -988,26 +955,30 @@ namespace auto&& action = actions[idx]; clean_prepare_dir(fs, paths.package_dir(action.spec)); - url_paths.emplace_back(make_gcs_path(prefix, action.package_abi().value_or_exit(VCPKG_LINE_INFO)), - make_temp_archive_path(paths.buildtrees(), action.spec)); + url_paths.emplace_back( + make_object_path(prefix, action.package_abi().value_or_exit(VCPKG_LINE_INFO)), + make_temp_archive_path(paths.buildtrees(), action.spec)); url_indices.push_back(idx); } if (url_paths.empty()) break; - print2("Attempting to fetch ", url_paths.size(), " packages from GCS.\n"); + msg::println( + msgAttemptingToFetchPackagesFromVendor, msg::count = url_paths.size(), msg::vendor = vendor()); + std::vector jobs; std::vector idxs; for (size_t idx = 0; idx < url_paths.size(); ++idx) { auto&& action = actions[url_indices[idx]]; auto&& url_path = url_paths[idx]; - if (!gsutil_download_file(url_path.first, url_path.second)) continue; + if (!download_file(url_path.first, url_path.second)) continue; jobs.push_back(decompress_zip_archive_cmd(paths, paths.package_dir(action.spec), url_path.second)); idxs.push_back(idx); } - const auto job_results = decompress_in_parallel(jobs); + const auto job_results = + cmd_execute_and_capture_output_parallel(jobs, default_working_directory, get_clean_environment()); for (size_t j = 0; j < jobs.size(); ++j) { @@ -1025,11 +996,10 @@ namespace } } - print2("Restored ", - restored_count, - " packages from GCS servers in ", - timer.elapsed(), - ". Use --debug for more information.\n"); + msg::println(msgRestoredPackagesFromVendor, + msg::count = restored_count, + msg::elapsed = timer.elapsed(), + msg::vendor = vendor()); } RestoreResult try_restore(const Dependencies::InstallPlanAction&) const override @@ -1040,6 +1010,7 @@ namespace void push_success(const Dependencies::InstallPlanAction& action) const override { if (m_write_prefixes.empty()) return; + const auto timer = ElapsedTimer::create_started(); const auto& abi = action.package_abi().value_or_exit(VCPKG_LINE_INFO); auto& spec = action.spec; const auto tmp_archive_path = make_temp_archive_path(paths.buildtrees(), spec); @@ -1050,16 +1021,20 @@ namespace Color::warning, "Failed to compress folder '", paths.package_dir(spec), "', exit code: ", code); return; } + size_t upload_count = 0; for (const auto& prefix : m_write_prefixes) { - if (gsutil_upload_file(make_gcs_path(prefix, abi), tmp_archive_path)) + if (upload_file(make_object_path(prefix, abi), tmp_archive_path)) { ++upload_count; } } - print2("Uploaded binaries to ", upload_count, " GCS remotes.\n"); + msg::println(msgUploadedPackagesToVendor, + msg::count = upload_count, + msg::elapsed = timer.elapsed(), + msg::vendor = vendor()); } void precheck(View actions, View cache_status) const override @@ -1076,7 +1051,7 @@ namespace continue; } - if (gsutil_stat(make_gcs_path(prefix, abi))) + if (stat(make_object_path(prefix, abi))) { actions_availability[idx] = CacheAvailability::available; cache_status[idx]->mark_available(this); @@ -1094,222 +1069,141 @@ namespace } } - private: + protected: + virtual StringLiteral vendor() const = 0; + virtual bool stat(StringView url) const = 0; + virtual bool upload_file(StringView object, const Path& archive) const = 0; + virtual bool download_file(StringView object, const Path& archive) const = 0; + const VcpkgPaths& paths; + private: std::vector m_read_prefixes; std::vector m_write_prefixes; }; - bool awscli_stat(const VcpkgPaths& paths, const std::string& url, const bool no_sign_request) + struct GcsBinaryProvider : ObjectStorageProvider { - auto cmd = Command{paths.get_tool_exe(Tools::AWSCLI)}.string_arg("s3").string_arg("ls").string_arg(url); - if (no_sign_request) + GcsBinaryProvider(const VcpkgPaths& paths, + std::vector&& read_prefixes, + std::vector&& write_prefixes) + : ObjectStorageProvider(paths, std::move(read_prefixes), std::move(write_prefixes)) { - cmd.string_arg("--no-sign-request"); } - return cmd_execute(cmd) == 0; - } - bool awscli_upload_file(const VcpkgPaths& paths, - const std::string& aws_object, - const Path& archive, - const bool no_sign_request) - { - auto cmd = - Command{paths.get_tool_exe(Tools::AWSCLI)}.string_arg("s3").string_arg("cp").string_arg(archive).string_arg( - aws_object); - if (no_sign_request) - { - cmd.string_arg("--no-sign-request"); - } - const auto out = cmd_execute_and_capture_output(cmd); - if (out.exit_code == 0) - { - return true; - } + StringLiteral vendor() const override { return "GCS"; } - msg::println(Color::warning, msgAwsFailedToDownload, msg::exit_code = out.exit_code); - msg::write_unlocalized_text_to_stdout(Color::warning, out.output); - return false; - } + Command command() const { return Command{paths.get_tool_exe(Tools::GSUTIL)}; } - bool awscli_download_file(const VcpkgPaths& paths, - const std::string& aws_object, - const Path& archive, - const bool no_sign_request) - { - auto cmd = Command{paths.get_tool_exe(Tools::AWSCLI)} - .string_arg("s3") - .string_arg("cp") - .string_arg(aws_object) - .string_arg(archive); - if (no_sign_request) + bool stat(StringView url) const override { - cmd.string_arg("--no-sign-request"); + auto cmd = command().string_arg("-q").string_arg("stat").string_arg(url); + return cmd_execute(cmd) == 0; } - const auto out = cmd_execute_and_capture_output(cmd); - if (out.exit_code == 0) + + bool upload_file(StringView object, const Path& archive) const override { - return true; + auto cmd = command().string_arg("-q").string_arg("cp").string_arg(archive).string_arg(object); + const auto out = cmd_execute_and_capture_output(cmd); + if (out.exit_code == 0) + { + return true; + } + + msg::println(Color::warning, + msgObjectStorageToolFailed, + msg::exit_code = out.exit_code, + msg::tool_name = Tools::GSUTIL); + msg::write_unlocalized_text_to_stdout(Color::warning, out.output); + return false; } - msg::println(Color::warning, msgAwsFailedToDownload, msg::exit_code = out.exit_code); - msg::write_unlocalized_text_to_stdout(Color::warning, out.output); - return false; - } + bool download_file(StringView object, const Path& archive) const override + { + auto cmd = command().string_arg("-q").string_arg("cp").string_arg(object).string_arg(archive); + const auto out = cmd_execute_and_capture_output(cmd); + if (out.exit_code == 0) + { + return true; + } + + msg::println(Color::warning, + msgObjectStorageToolFailed, + msg::exit_code = out.exit_code, + msg::tool_name = Tools::GSUTIL); + msg::write_unlocalized_text_to_stdout(Color::warning, out.output); + return false; + } + }; - struct AwsBinaryProvider : IBinaryProvider + struct AwsBinaryProvider : ObjectStorageProvider { AwsBinaryProvider(const VcpkgPaths& paths, std::vector&& read_prefixes, std::vector&& write_prefixes, const bool no_sign_request) - : paths(paths) - , m_read_prefixes(std::move(read_prefixes)) - , m_write_prefixes(std::move(write_prefixes)) + : ObjectStorageProvider(paths, std::move(read_prefixes), std::move(write_prefixes)) , m_no_sign_request(no_sign_request) { } - static std::string make_aws_path(const std::string& prefix, const std::string& abi) - { - return Strings::concat(prefix, abi, ".zip"); - } - - void prefetch(View actions, View cache_status) const override - { - auto& fs = paths.get_filesystem(); + StringLiteral vendor() const override { return "AWS"; } - const auto timer = ElapsedTimer::create_started(); + Command command() const { return Command{paths.get_tool_exe(Tools::AWSCLI)}; } - size_t restored_count = 0; - for (const auto& prefix : m_read_prefixes) + bool stat(StringView url) const override + { + auto cmd = command().string_arg("s3").string_arg("ls").string_arg(url); + if (m_no_sign_request) { - std::vector> url_paths; - std::vector url_indices; - - for (size_t idx = 0; idx < cache_status.size(); ++idx) - { - const auto this_cache_status = cache_status[idx]; - if (!this_cache_status || !this_cache_status->should_attempt_restore(this)) - { - continue; - } - - auto&& action = actions[idx]; - clean_prepare_dir(fs, paths.package_dir(action.spec)); - url_paths.emplace_back(make_aws_path(prefix, action.package_abi().value_or_exit(VCPKG_LINE_INFO)), - make_temp_archive_path(paths.buildtrees(), action.spec)); - url_indices.push_back(idx); - } - - if (url_paths.empty()) break; - - msg::println(msgAwsAttemptingToFetchPackages, msg::count = url_paths.size()); - - std::vector jobs; - std::vector idxs; - for (size_t idx = 0; idx < url_paths.size(); ++idx) - { - auto&& action = actions[url_indices[idx]]; - auto&& url_path = url_paths[idx]; - if (!awscli_download_file(paths, url_path.first, url_path.second, m_no_sign_request)) continue; - jobs.push_back(decompress_zip_archive_cmd(paths, paths.package_dir(action.spec), url_path.second)); - idxs.push_back(idx); - } - - const auto job_results = - cmd_execute_and_capture_output_parallel(jobs, default_working_directory, get_clean_environment()); - - for (size_t j = 0; j < jobs.size(); ++j) - { - const auto idx = idxs[j]; - if (job_results[j].exit_code != 0) - { - Debug::print("Failed to decompress ", url_paths[idx].second, '\n'); - continue; - } - - // decompression success - ++restored_count; - fs.remove(url_paths[idx].second, VCPKG_LINE_INFO); - cache_status[url_indices[idx]]->mark_restored(); - } + cmd.string_arg("--no-sign-request"); } - - msg::println(msgAwsRestoredPackages, msg::count = restored_count, msg::elapsed = timer.elapsed()); - } - - RestoreResult try_restore(const Dependencies::InstallPlanAction&) const override - { - return RestoreResult::unavailable; + return cmd_execute(cmd) == 0; } - void push_success(const Dependencies::InstallPlanAction& action) const override + bool upload_file(StringView object, const Path& archive) const override { - if (m_write_prefixes.empty()) return; - const auto& abi = action.package_abi().value_or_exit(VCPKG_LINE_INFO); - auto& spec = action.spec; - const auto tmp_archive_path = make_temp_archive_path(paths.buildtrees(), spec); - int code = compress_directory_to_zip(paths, paths.package_dir(spec), tmp_archive_path); - if (code != 0) + auto cmd = command().string_arg("s3").string_arg("cp").string_arg(archive).string_arg(object); + if (m_no_sign_request) { - vcpkg::print2( - Color::warning, "Failed to compress folder '", paths.package_dir(spec), "', exit code: ", code); - return; + cmd.string_arg("--no-sign-request"); } - - size_t upload_count = 0; - for (const auto& prefix : m_write_prefixes) + const auto out = cmd_execute_and_capture_output(cmd); + if (out.exit_code == 0) { - if (awscli_upload_file(paths, make_aws_path(prefix, abi), tmp_archive_path, m_no_sign_request)) - { - ++upload_count; - } + return true; } - msg::println(msgAwsUploadedPackages, msg::count = upload_count); + msg::println(Color::warning, + msgObjectStorageToolFailed, + msg::exit_code = out.exit_code, + msg::tool_name = Tools::AWSCLI); + msg::write_unlocalized_text_to_stdout(Color::warning, out.output); + return false; } - void precheck(View actions, View cache_status) const override + bool download_file(StringView object, const Path& archive) const override { - std::vector actions_availability{actions.size()}; - for (const auto& prefix : m_read_prefixes) + auto cmd = command().string_arg("s3").string_arg("cp").string_arg(object).string_arg(archive); + if (m_no_sign_request) { - for (size_t idx = 0; idx < actions.size(); ++idx) - { - auto&& action = actions[idx]; - const auto& abi = action.package_abi().value_or_exit(VCPKG_LINE_INFO); - if (!cache_status[idx]->should_attempt_precheck(this)) - { - continue; - } - - if (awscli_stat(paths, make_aws_path(prefix, abi), m_no_sign_request)) - { - actions_availability[idx] = CacheAvailability::available; - cache_status[idx]->mark_available(this); - } - } + cmd.string_arg("--no-sign-request"); } - - for (size_t idx = 0; idx < actions.size(); ++idx) + const auto out = cmd_execute_and_capture_output(cmd); + if (out.exit_code == 0) { - const auto this_cache_status = cache_status[idx]; - if (this_cache_status && actions_availability[idx] == CacheAvailability::unavailable) - { - this_cache_status->mark_unavailable(this); - } + return true; } + + msg::println(Color::warning, + msgObjectStorageToolFailed, + msg::exit_code = out.exit_code, + msg::tool_name = Tools::AWSCLI); + msg::write_unlocalized_text_to_stdout(Color::warning, out.output); + return false; } private: - const VcpkgPaths& paths; - - std::vector m_read_prefixes; - std::vector m_write_prefixes; - bool m_no_sign_request; }; }