Skip to content

Commit

Permalink
internal: improve yarn.cmake error handling (skyrim-multiplayer#1892)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pospelove authored Mar 30, 2024
1 parent d3456ef commit 592c652
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/yarn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function(yarn_execute_command)
WORKING_DIRECTORY ${A_WORKING_DIRECTORY}
RESULT_VARIABLE yarn_result
OUTPUT_VARIABLE yarn_output
# TODO: ERROR_VARIABLE
ERROR_VARIABLE yarn_error
)

if("${A_RESULT_VARIABLE}" STREQUAL "")
if(NOT "${yarn_result}" STREQUAL "0")
message(FATAL_ERROR "yarn ${A_COMMAND} exited with ${yarn_result}:\n${yarn_output}")
message(FATAL_ERROR "yarn ${A_COMMAND} exited with ${yarn_result}:\n${yarn_output}\n${yarn_error}")
endif()
else()
set("${A_RESULT_VARIABLE}" "${yarn_result}" PARENT_SCOPE)
Expand Down

0 comments on commit 592c652

Please sign in to comment.