fix(retrieval): keep Bash auto result status

This commit is contained in:
Julian lechner committed 2026-09-24 17:08:30 +02:00
1 parent 5f1a7b4d4f
commit cbd30b078b
3 files changed
+5 -5

No files matched your search

+1 -2
View File
@@ -49,8 +49,7 @@ read_semantic_retrieval_option() {
y|Y|yes|Yes|YES) printf 'true\n'; return ;;
n|N|no|No|NO) printf 'false\n'; return ;;
a|A|auto|Auto|AUTO)
if test_semantic_retrieval_device "$root" "$home_path"; then printf 'true\n'; return; fi
status=$?
if test_semantic_retrieval_device "$root" "$home_path"; then printf 'true\n'; return; else status=$?; fi
[ "$status" -eq 1 ] && { printf 'false\n'; return; }
return "$status"
;;
+3 -2
View File
@@ -14,7 +14,8 @@ test_semantic_retrieval_device() {
local root=$1 home_path=$2 summary=${3:-false}
local arguments=("$root/scripts/lib/semantic-retrieval.py" benchmark --root "$root" --home "$home_path")
[ "$summary" != true ] || arguments+=(--summary)
if python3 "${arguments[@]}" >&2; then return 0; fi
[ "$?" -eq 2 ] && return 1
local status
if python3 "${arguments[@]}" >&2; then return 0; else status=$?; fi
[ "$status" -eq 2 ] && return 1
return 2
}