Skip to content

Commit

Permalink
USAGOV-1761-cf-components-audit: fixed uniary operator error
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobaaronyeager committed Sep 30, 2024
1 parent 8325331 commit 32ff5f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/cloudgov/audit/cf-components
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ echo "$ORGIDS" | jq -r '.[]' | while read -r ORGID; do

if [ $spaces == "all" ]; then
SPACEPAGES=cf curl "/v3/spaces" | jq -r '.pagination | .total_pages';
if [ $SPACEPAGES -gt 1 ]; then
if [[ $SPACEPAGES -gt 1 ]]; then
for i in $SPACEPAGES; do
SPACEIDS=$(cf curl "/v3/spaces?page=$i&per_page=50" | jq -r '.resources[] | select( .relationships.organization.data.guid == "'$ORGID'" ) | .guid')
done
Expand All @@ -104,7 +104,7 @@ echo "$ORGIDS" | jq -r '.[]' | while read -r ORGID; do
fi
else
SPACEPAGES=cf curl "/v3/spaces" | jq -r '.pagination | .total_pages';
if [ $SPACEPAGES -gt 1 ]; then
if [[ $SPACEPAGES -gt 1 ]]; then
for i in $SPACEPAGES; do
SPACEIDS=$(cf curl "/v3/spaces?page=$i&per_page=50" | jq -r '.resources[] | select( .relationships.organization.data.guid == "'$ORGID'" ) | .guid' | while read -r SPACEID; do
SPACENAME=$(cf curl "/v3/spaces/$SPACEID" | jq -r '.name')
Expand Down

0 comments on commit 32ff5f9

Please sign in to comment.