From 713bea982f28ff32a39c1bc951b0bf8580504724 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Mon, 15 Apr 2024 16:49:25 +0200 Subject: [PATCH] fix: [cron] prevent error to be stored in cache --- cron/lib/common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cron/lib/common b/cron/lib/common index 4053217..4f9b6c7 100644 --- a/cron/lib/common +++ b/cron/lib/common @@ -71,7 +71,9 @@ cron:get_config() { fi cron:get_config "$value" || return 1 ;; - esac > "$cache_file" + esac > "$cache_file.tmp" + + mv -v "$cache_file.tmp" "$cache_file" >&2 ## if cache file is empty, this is an error if [ ! -s "$cache_file" ]; then