Skip to content

Commit

Permalink
FIX Add brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed May 16, 2024
1 parent 56dc8f6 commit 5ef719f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ MS_GITHUB_TOKEN=abc123 php run.php update --cms-major=5 --branch=next-minor --dr
| --exclude=[modules] | Exclude the specified modules (without account prefix) separated by commas e.g. `silverstripe-mfa,silverstripe-totp` |
| --dry-run | Do not push to github or create pull-requests |
| --account | GitHub account to use for creating pull-requests (default: creative-commoners) |
| --no-delete | Do not delete `_data` and `modules` directories before running |
| --no-delete | Do not delete `_data` and `_modules` directories before running |
| --update-prs | Update existing open PRs instead of creating new PRs |

**Note** that using `--branch=github-default` will only run scripts in the `scripts/default-branch` directory.
Expand Down
4 changes: 2 additions & 2 deletions funcs_scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function module_is_recipe()
error("Could not parse from composer.json - last error was $lastError");
}

return $json->type ?? '' === 'silverstripe-recipe';
return ($json->type ?? '') === 'silverstripe-recipe';
}

/**
Expand Down Expand Up @@ -190,7 +190,7 @@ function is_composer_plugin()
error("Could not parse from composer.json - last error was $lastError");
}

return $json->type ?? '' === 'composer-plugin';
return ($json->type ?? '') === 'composer-plugin';
}

/**
Expand Down
2 changes: 2 additions & 0 deletions funcs_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function write_file($path, $contents)

/**
* Returns a list of all scripts files to run against a particular cms major version
* Scripts will be alphabetically sorted
*/
function script_files($cmsMajor)
{
Expand Down Expand Up @@ -78,6 +79,7 @@ function script_files($cmsMajor)
}
closedir($handle);
}
sort($scriptFiles);
return $scriptFiles;
}

Expand Down

0 comments on commit 5ef719f

Please sign in to comment.