DEV: Check files not dirs before calling prettier

This commit is contained in:
Jarek Radosz 2021-04-06 16:30:09 +02:00
parent d1e55c9361
commit e5e26b5b53
1 changed files with 3 additions and 2 deletions

View File

@ -36,10 +36,11 @@ jobs:
if: ${{ always() }}
run: |
yarn prettier -v
if [ -d "assets" ]; then \
shopt -s extglob
if ls assets/**/*.@(scss|js|es6) &> /dev/null; then \
yarn prettier --list-different "assets/**/*.{scss,js,es6}" ; \
fi
if [ -d "test" ]; then \
if ls test/**/*.@(js|es6) &> /dev/null; then \
yarn prettier --list-different "test/**/*.{js,es6}" ; \
fi