The plain "Exit code" string had a newline that we do not have in the other result strings. This typo was inherited from KWSys Process, which has been fixed by its upstream. Fixes: #27119
@@ -536,7 +536,7 @@ std::string cmProcess::GetExitExceptionString() const
case STATUS_NO_MEMORY:
default:
char buf[1024];
- char const* fmt = "Exit code 0x%" KWIML_INT_PRIx64 "\n";
+ char const* fmt = "Exit code 0x%" KWIML_INT_PRIx64;
snprintf(buf, sizeof(buf), fmt, this->ExitValue);
exception_str.assign(buf);
}
@@ -564,7 +564,7 @@ cmUVProcessChain::Status::GetException() const
default: {
char buf[256];
- snprintf(buf, sizeof(buf), "Exit code 0x%x\n",
+ snprintf(buf, sizeof(buf), "Exit code 0x%x",
static_cast<unsigned int>(this->ExitStatus));
return std::make_pair(ExceptionCode::Other, buf);