diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-19 15:47:50 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-20 13:22:25 -0700 |
commit | 7e5b0545665f349c842d46c5e8eae7595ca5f89b (patch) | |
tree | 5dbb2cea7d00efd8d113315511a206d38944f829 /cmake/mbgl.cmake | |
parent | fb736e8ef0e422bb0dc9b10a141b4f38488aa922 (diff) | |
download | qtlocation-mapboxgl-7e5b0545665f349c842d46c5e8eae7595ca5f89b.tar.gz |
[build] See what happened when `npm install` fails
Diffstat (limited to 'cmake/mbgl.cmake')
-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() |