Fix backup NDJSON: compact items array with jq -c to keep each run on one line
This commit is contained in:
parent
f46fe07ca8
commit
4f4f29720d
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ add_item() {
|
|||
finish() {
|
||||
local status="$1" error_msg="${2:-}"
|
||||
local run_finished=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
|
||||
local items=$(cat "$ITEMS_FILE")
|
||||
local items=$(jq -c '.' "$ITEMS_FILE")
|
||||
local error_json='null'
|
||||
[ -n "$error_msg" ] && error_json="\"$(echo "$error_msg" | sed 's/"/\\"/g')\""
|
||||
rm -f "$ITEMS_FILE" "${ITEMS_FILE}.tmp"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue