Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcpkg_execute_build_process.cmake: Check if the exit code is a string #28405

Merged
merged 2 commits into from
Jan 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/cmake/vcpkg_execute_build_process.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ function(vcpkg_execute_build_process)
ERROR_FILE "${log_err}"
RESULT_VARIABLE error_code
)

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()
if(NOT error_code EQUAL "0")
file(READ "${log_out}" out_contents)
file(READ "${log_err}" err_contents)
Expand Down