From 587229f9b51a224928ad8a20088a03b19fa778ef Mon Sep 17 00:00:00 2001 From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com> Date: Fri, 18 Aug 2023 01:05:58 -0500 Subject: [PATCH] Update functions.sh: fix determineCommandToUse() --- scripts/functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index a4d7c68a0..d4ad80e08 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -66,8 +66,8 @@ function doExit() # RPi cameras can use either "raspistill" on Buster or "libcamera-still" on Bullseye # to actually take pictures. # Determine which to use. -# On success, return 1 and the command to use. -# On failure, return 0 and an error message. +# On success, return 0 and the command to use. +# On failure, return non-0 and an error message. function determineCommandToUse() { local USE_doExit="${1}" # Call doExit() on error? @@ -77,7 +77,7 @@ function determineCommandToUse() # If it's not installed, or IS installed but doesn't work (the user may not have it configured), # use raspistill. - local RET=0 + local RET=1 local CMD="libcamera-still" if command -v ${CMD} > /dev/null; then # Found the command - see if it works.