From 38bb67d699b04435d2060e6f61a7a4ea239b6828 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz Date: Tue, 2 Apr 2024 21:23:54 +0200 Subject: [PATCH] fix: fix crash of detect_libcamera without CSI cam Signed-off-by: Patrick Gehrsitz --- libs/hwhandler.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hwhandler.sh b/libs/hwhandler.sh index 515b2b6b..32ad9448 100755 --- a/libs/hwhandler.sh +++ b/libs/hwhandler.sh @@ -62,7 +62,7 @@ detect_libcamera() { local avail if [[ "$(is_raspberry_pi)" = "1" ]] && [[ -x "$(command -v libcamera-hello)" ]]; then - avail="$(libcamera-hello --list-cameras | grep -c "Available")" + avail="$(libcamera-hello --list-cameras | grep -c "Available" || echo "0")" if [[ "${avail}" = "1" ]]; then get_libcamera_path | wc -l else