Skip to content

Commit cd02772

Browse files
committed
execute_process(): treat errors as fatal
1 parent 6399325 commit cd02772

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

guide/build.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function(BuildBook LANGUAGE SOURCE_DIR TARGET_DIR)
66
message(WARNING "Skipping '${LANGUAGE}' – SUMMARY.md not found at ${SOURCE_DIR}")
77
return()
88
endif()
9-
9+
1010
if(NOT EXISTS "${SOURCE_DIR}/book.toml")
1111
message(WARNING "Skipping '${LANGUAGE}' – book.toml not found at ${SOURCE_DIR}")
1212
return()
@@ -16,10 +16,11 @@ function(BuildBook LANGUAGE SOURCE_DIR TARGET_DIR)
1616
execute_process(
1717
COMMAND mdbook build -d ${TARGET_DIR}
1818
WORKING_DIRECTORY ${SOURCE_DIR}
19+
COMMAND_ERROR_IS_FATAL ANY
1920
)
2021
endfunction()
2122

22-
# Copy the theme folder
23+
# Copy the theme folder
2324
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/theme" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/translations")
2425

2526
BuildBook("en" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/book")

0 commit comments

Comments
 (0)