file(DOWNLOAD): Fix message for existing file with matching hash

file(DOWNLOAD STATUS) docs say the return list is of
length 2. However, when an already downloaded file
hash matches EXPECTED_HASH, the return message had
a semicolon that made the return list length 3.
Adjust the message to no longer contain the extra semicolon
and to more clearly describe the situation.
This commit is contained in:
Michael Hirsch 2022-08-21 23:42:28 -04:00 committed by Craig Scott
parent 7037cfc0f4
commit 87a40b720a
No known key found for this signature in database
GPG Key ID: 6FF37CBDCCADED9F

View File

@ -1914,7 +1914,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
std::string msg;
std::string actualHash = hash->HashFile(file);
if (actualHash == expectedHash) {
msg = cmStrCat("returning early; file already exists with expected ",
msg = cmStrCat("skipping download as file already exists with expected ",
hashMatchMSG, '"');
if (!statusVar.empty()) {
status.GetMakefile().AddDefinition(statusVar, cmStrCat(0, ";\"", msg));