mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[vcpkg] Better vcpkg_apply_patches error message (#10127)
This commit is contained in:
parent
4f46ab90fc
commit
81965f6b3f
@ -41,13 +41,14 @@ function(vcpkg_apply_patches)
|
||||
_execute_process(
|
||||
COMMAND ${GIT} --work-tree=. --git-dir=.git apply "${ABSOLUTE_PATCH}" --ignore-whitespace --whitespace=nowarn --verbose
|
||||
OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log
|
||||
ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log
|
||||
ERROR_VARIABLE error
|
||||
WORKING_DIRECTORY ${_ap_SOURCE_PATH}
|
||||
RESULT_VARIABLE error_code
|
||||
)
|
||||
file(WRITE "${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log" "${error}")
|
||||
|
||||
if(error_code AND NOT _ap_QUIET)
|
||||
message(FATAL_ERROR "Applying patch failed. Patch needs to be updated to work with source being used by vcpkg!")
|
||||
message(FATAL_ERROR "Applying patch failed. ${error}")
|
||||
endif()
|
||||
|
||||
math(EXPR PATCHNUM "${PATCHNUM}+1")
|
||||
|
Loading…
x
Reference in New Issue
Block a user