Skip to content

Commit

Permalink
FIX Use brackets for if statement (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Oct 4, 2023
1 parent 8ecbf07 commit 4339e4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,9 @@ jobs:
BRANCH_MAJOR=${BASH_REMATCH[0]}
echo "Checking for supported modules in CMS $CMS_MAJOR against branch major $BRANCH_MAJOR"
curl -s -o __modules.json https://raw.githubusercontent.com/silverstripe/supported-modules/$CMS_MAJOR/modules.json
if ! jq -e '.' __modules.json >/dev/null 2>&1; then
# If we can't parse the JSON at all, $MODULES will be an empty string and that means we couldn't fetch the file.
MODULES=$(jq -e '.' __modules.json) || true
if [[ $MODULES == "" ]]; then
# If there is some error getting the file (e.g. 404 if $CMS_MAJOR is some value we don't have a file for),
# the error will be in the __modules.json file - importantly, not in JSON format.
echo "Cannot parse supported-modules JSON. Aborting. The content we tried to parse was:"
Expand Down

0 comments on commit 4339e4e

Please sign in to comment.