DEV: Check files not dirs before calling prettier
This commit is contained in:
parent
d1e55c9361
commit
e5e26b5b53
|
@ -36,10 +36,11 @@ jobs:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: |
|
run: |
|
||||||
yarn prettier -v
|
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}" ; \
|
yarn prettier --list-different "assets/**/*.{scss,js,es6}" ; \
|
||||||
fi
|
fi
|
||||||
if [ -d "test" ]; then \
|
if ls test/**/*.@(js|es6) &> /dev/null; then \
|
||||||
yarn prettier --list-different "test/**/*.{js,es6}" ; \
|
yarn prettier --list-different "test/**/*.{js,es6}" ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue