schutzbot: double quote jq argument to prevent shellcheck failures
The argument contains a variable $i. Shellcheck complains that it must be quoted.
This commit is contained in:
parent
cfa8d7a636
commit
01acebda64
1 changed files with 2 additions and 2 deletions
|
|
@ -28,8 +28,8 @@ HOURS_BACK="${HOURS_BACK:-6}"
|
|||
DELETE_TIME=$(date -d "- $HOURS_BACK hours" +%s)
|
||||
OLD_RESOURCE_LIST_NAMES=()
|
||||
for i in $(seq 0 $(("$RESOURCE_COUNT"-1))); do
|
||||
RESOURCE_TIME=$(echo "$RESOURCE_LIST" | jq .[$i].createdTime | tr -d '"')
|
||||
RESOURCE_TYPE=$(echo "$RESOURCE_LIST" | jq .[$i].type | tr -d '"')
|
||||
RESOURCE_TIME=$(echo "$RESOURCE_LIST" | jq ".[$i].createdTime" | tr -d '"')
|
||||
RESOURCE_TYPE=$(echo "$RESOURCE_LIST" | jq ".[$i].type" | tr -d '"')
|
||||
RESOURCE_TIME_SECONDS=$(date -d "$RESOURCE_TIME" +%s)
|
||||
if [[ "$RESOURCE_TIME_SECONDS" -lt "$DELETE_TIME" && "$RESOURCE_TYPE" != Microsoft.Storage/storageAccounts ]]; then
|
||||
OLD_RESOURCE_LIST_NAMES+=("$(echo "$RESOURCE_LIST" | jq .["$i"].name | sed -e 's/^[^-]*-//' | tr -d '"')")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue