diff options
-rw-r--r-- | cmake/mbgl.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/mbgl.cmake b/cmake/mbgl.cmake index 0809d911a9..7f2eaf86b0 100644 --- a/cmake/mbgl.cmake +++ b/cmake/mbgl.cmake @@ -44,9 +44,13 @@ if(WITH_NODEJS) execute_process( COMMAND "${NodeJS_EXECUTABLE}" "${npm_EXECUTABLE}" install --ignore-scripts WORKING_DIRECTORY "${DIRECTORY}" - RESULT_VARIABLE NPM_INSTALL_FAILED) + RESULT_VARIABLE NPM_INSTALL_FAILED + OUTPUT_VARIABLE NPM_OUTPUT + ERROR_VARIABLE NPM_OUTPUT) if(NOT NPM_INSTALL_FAILED) execute_process(COMMAND ${CMAKE_COMMAND} -E touch "${DIRECTORY}/node_modules/.${NAME}.stamp") + else() + message(FATAL_ERROR "NPM install failed:\n${NPM_OUTPUT}") endif() endif() |