Fix print build logs on negative status code (#48665)

This commit is contained in:
Charles Cabergs
2025-12-05 02:04:54 +01:00
committed by GitHub
parent 7b69ba9f7a
commit b6c0ab3c0e

View File

@@ -53,7 +53,7 @@ function(vcpkg_execute_build_process)
ERROR_FILE "${log_err}"
RESULT_VARIABLE error_code
)
if (NOT error_code MATCHES "^[0-9]+$")
if (NOT error_code MATCHES "^-?[0-9]+$")
list(JOIN arg_COMMAND " " command)
message(FATAL_ERROR "Failed to execute command \"${command}\" in working directory \"${arg_WORKING_DIRECTORY}\": ${error_code}")
endif()