Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL

Capture `execute_process` calls' `RESULT_VARIABLE`.

We don't actually need to check the result as we presume the existing
logic is already adequate, and sometimes programs return non-zero values
as result of valid query.  I.e. this is a "safe" way to broadly protect
these scripts.

Issue: #27782
This commit is contained in:
scivision
2026-05-07 09:26:47 -04:00
parent 46410ea189
commit 7406f0be82
39 changed files with 144 additions and 51 deletions

View File

@@ -41,7 +41,8 @@ function(android_push_test_files_to_device)
set(${file_exists} "")
execute_process(
COMMAND ${adb_executable} shell ls ${device_file}
OUTPUT_VARIABLE out_var ERROR_VARIABLE out_var)
OUTPUT_VARIABLE out_var ERROR_VARIABLE out_var
RESULT_VARIABLE _result_check_file)
if(NOT out_var) # when a directory exists but is empty the output is empty
set(${file_exists} "YES")
else()