Skip to content

Commit 6b5027a

Browse files
committed
Fix check_dependencies.sh exit code for optional tools
- Return 0 instead of 1 for optional tools when not found - This prevents set -e from terminating the script - Optional tools (gh) not found should only trigger warnings, not exit 1 - Required tools still return 1 and trigger proper error handling
1 parent 410a164 commit 6b5027a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/check_dependencies.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ check_command() {
3030
echo -e "${RED}${NC} $cmd: NOT FOUND (REQUIRED)"
3131
echo " Install: $install_hint"
3232
((ERRORS++))
33+
return 1
3334
else
3435
echo -e "${YELLOW}${NC} $cmd: NOT FOUND (optional)"
3536
echo " Install: $install_hint"
3637
((WARNINGS++))
38+
return 0 # Return 0 for optional tools to not trigger set -e
3739
fi
38-
return 1
3940
fi
4041
}
4142

0 commit comments

Comments
 (0)