diff options
author | Brad King <brad.king@kitware.com> | 2022-10-31 13:46:38 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-10-31 13:47:18 (GMT) |
commit | c8f3ba7214769b940cbd60623d33b62f697ba43c (patch) | |
tree | dbc5cfb81099bbcabb47d7f4c76037e765e718a7 /Source | |
parent | 628d1c339650598c91f77d5b47429571d40dedb7 (diff) | |
parent | d78671879b8779ef73b7b256f6d0eeb874ce6687 (diff) | |
download | CMake-c8f3ba7214769b940cbd60623d33b62f697ba43c.zip CMake-c8f3ba7214769b940cbd60623d33b62f697ba43c.tar.gz CMake-c8f3ba7214769b940cbd60623d33b62f697ba43c.tar.bz2 |
Merge topic 'file-download-log-with-hash' into release-3.25
d78671879b file(DOWNLOAD): Fix LOG with EXPECTED_HASH on download failure
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7848
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileCommand.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 421ff12..fe38db5 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2090,6 +2090,13 @@ bool HandleDownloadCommand(std::vector<std::string> const& args, ::curl_global_cleanup(); + // Ensure requested curl logs are returned (especially in case of failure) + // + if (!logVar.empty()) { + chunkDebug.push_back(0); + status.GetMakefile().AddDefinition(logVar, chunkDebug.data()); + } + // Explicitly flush/close so we can measure the md5 accurately. // if (!file.empty()) { @@ -2132,11 +2139,6 @@ bool HandleDownloadCommand(std::vector<std::string> const& args, } } - if (!logVar.empty()) { - chunkDebug.push_back(0); - status.GetMakefile().AddDefinition(logVar, chunkDebug.data()); - } - return true; #else status.SetError("DOWNLOAD not supported by bootstrap cmake."); |