fix: Prevent set -e exit on grep in prompt_for_cron_setup

This commit is contained in:
courtmanr@gmail.com
2025-04-23 15:00:09 +01:00
parent 20df770df1
commit c129d37b13
+1 -1
View File
@@ -592,7 +592,7 @@ prompt_for_cron_setup() {
# Always get the full crontab, even if empty
local crontab_content
crontab_content=$(crontab -l -u root 2>/dev/null || true)
existing_cron=$(echo "$crontab_content" | grep -A 1 "$CRON_IDENTIFIER")
existing_cron=$(echo "$crontab_content" | grep -A 1 "$CRON_IDENTIFIER" || true)
if [ -n "$existing_cron" ]; then
comment_line=$(echo "$existing_cron" | head -n 1)
cron_command_line=$(echo "$existing_cron" | tail -n 1)