Skip to content

file(DOWNLOAD): Fix LOG with EXPECTED_HASH on download failure

When file(DOWNLOAD <url> EXPECTED_HASH <hash> LOG <logs>) fails to download the requested file, the hash check will also fail and make the command exit without actually returning the curl logs as requested by the LOG argument. Which does not help to diagnose why download failed.

This MR fixes this issue by ensuring the requested curl logs are returned even on download failure.

This fix is related to #24093 (closed) (to help diagnose the problem)

Issue: #24093 (closed)
Backport: release
Topic-rename: file-download-log-with-hash

Edited by Brad King

Merge request reports