Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit e595d6d

Browse files
committed
fix: jq error on empty or malformed json
1 parent fe9316e commit e595d6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/json/parse.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ parsePatchesJson() {
1212

1313
[ -n "$AVAILABLE_PATCHES" ] || AVAILABLE_PATCHES=$(jq -rc '.' "assets/$SOURCE/Patches-$PATCHES_VERSION.json")
1414

15-
[ -n "$ENABLED_PATCHES" ] || ENABLED_PATCHES=$(jq -rc '.' "$STORAGE/$SOURCE-patches.json" 2> /dev/null || echo '[]')
15+
[ -n "$ENABLED_PATCHES" ] || ENABLED_PATCHES=$(jq -erc '.' "$STORAGE/$SOURCE-patches.json" 2> /dev/null || echo '[]')
1616

1717
while [ -z "$APPS_LIST" ]; do
1818
if [ -e "assets/$SOURCE/Apps-$PATCHES_VERSION.json" ]; then

0 commit comments

Comments
 (0)