From 5ef3fa781ef9cae232306110e2f1bc6762b109eb Mon Sep 17 00:00:00 2001 From: Kostadin Shishmanov Date: Mon, 2 Feb 2026 21:42:53 +0200 Subject: [PATCH] Make tree-sitter-cli check fail instead of continuing Currently, the tree-sitter-cli check passes instead of failing even when the executable is not found which leads to a build failure. ``` [1/5] Generating parser.c FAILED: [code=127] tree-sitter-cpp/src/parser.c cd tree-sitter-cpp && TREE_SITTER_CLI-NOTFOUND generate src/grammar.json --abi=14 /bin/sh: line 1: TREE_SITTER_CLI-NOTFOUND: command not found ``` Signed-off-by: Kostadin Shishmanov --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b655fe8..40cf7a05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if(NOT ${TREE_SITTER_ABI_VERSION} MATCHES "^[0-9]+$") message(FATAL_ERROR "TREE_SITTER_ABI_VERSION must be an integer") endif() -find_program(TREE_SITTER_CLI tree-sitter DOC "Tree-sitter CLI") +find_program(TREE_SITTER_CLI tree-sitter DOC "Tree-sitter CLI" REQUIRED) add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/parser.c" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/grammar.json"