Skip to content

Commit

Permalink
Update updateJsonFile.sh: Change JQ_STRING initialization
Browse files Browse the repository at this point in the history
Using ".comment = .comment" worked when this script only updated a Website configuration file because they had a "comment" field.
The settings file doesn't, so use a benign initialization.
  • Loading branch information
EricClaeys authored Jan 24, 2025
1 parent b1faa89 commit 866506b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/updateJsonFile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ if [[ ! -f ${FILE} ]]; then
exit 1
fi

#shellcheck disable=SC2191
JQ_STRING=(.comment = .comment)
# Initialize JQ_STRING with a command that doesn't change anything.
# This is needed because each addition to JQ_STRING starts with "|".
JQ_STRING=( ".${1} = .${1}" )
OUTPUT_MESSAGE=""
NUMRE="^[+-]?[0-9]+([.][0-9]+)?$"

Expand Down

0 comments on commit 866506b

Please sign in to comment.