Skip to content

Commit 38bb67d

Browse files
committed
fix: fix crash of detect_libcamera without CSI cam
Signed-off-by: Patrick Gehrsitz <[email protected]>
1 parent 424954d commit 38bb67d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/hwhandler.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ detect_libcamera() {
6262
local avail
6363
if [[ "$(is_raspberry_pi)" = "1" ]] &&
6464
[[ -x "$(command -v libcamera-hello)" ]]; then
65-
avail="$(libcamera-hello --list-cameras | grep -c "Available")"
65+
avail="$(libcamera-hello --list-cameras | grep -c "Available" || echo "0")"
6666
if [[ "${avail}" = "1" ]]; then
6767
get_libcamera_path | wc -l
6868
else

0 commit comments

Comments
 (0)