Просмотр исходного кода

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 <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !7848
Brad King 3 лет назад
Родитель
Сommit
c8f3ba7214
1 измененных файлов с 7 добавлено и 5 удалено
  1. 7 5
      Source/cmFileCommand.cxx

+ 7 - 5
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.");