Skip to content

Commit

Permalink
fix: fix crash of detect_libcamera without CSI cam (#256)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>
  • Loading branch information
mryel00 committed Apr 2, 2024
1 parent 0d0caeb commit 3d23107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/hwhandler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d23107

Please sign in to comment.