From e5e26b5b53062ecbf439bb1bffb03b476e3f1533 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 6 Apr 2021 16:30:09 +0200 Subject: [PATCH] DEV: Check files not dirs before calling prettier --- .github/workflows/plugin-linting.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-linting.yml b/.github/workflows/plugin-linting.yml index 3d7f6d9..64c3b40 100644 --- a/.github/workflows/plugin-linting.yml +++ b/.github/workflows/plugin-linting.yml @@ -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