diff options
-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."); |