Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[build] See what happened when npm install fails
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Jul 20, 2018
1 parent fb736e8 commit 7e5b054
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/mbgl.cmake
Expand Up @@ -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()

Expand Down

0 comments on commit 7e5b054

Please sign in to comment.