Skip to content

Commit

Permalink
Merge pull request #4 from sebastianks/check-plugin-name
Browse files Browse the repository at this point in the history
Change to sh regex
  • Loading branch information
sebkolind authored Jan 10, 2021
2 parents d8e72fc + bb13924 commit c0b1f6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ if [ -n "$INPUT_PRETTIER_PLUGINS" ]; then
for plugin in $INPUT_PRETTIER_PLUGINS; do
echo "checking $plugin"
# check regex against @prettier/xyz
REGEX='(@prettier\/)+(plugin-[a-z\-]+)'
if ! [[ "$plugin" =~ "$REGEX" ]]; then
if ! echo "$plugin" | grep -Eq '(@prettier\/)+(plugin-[a-z\-]+)'; then
echo "$plugin does not seem to be a valid @prettier/plugin-x plugin."
exit 1
fi
Expand Down

0 comments on commit c0b1f6f

Please sign in to comment.