Browse Source

improve node sass workflow (#5347)

Daniel 1 year ago
parent
commit
2f64c3da87
1 changed files with 5 additions and 3 deletions
  1. 5 3
      .github/workflows/node-sass.yml

+ 5 - 3
.github/workflows/node-sass.yml

@@ -43,10 +43,12 @@ jobs:
       - name: Check built CSS files
         shell: bash
         run: |
-          if [[ $(find dist-sass/css/ -name "*.css" | xargs grep -F "\$" | wc -l | bc) -eq 0 ]]; then
-            echo "All good, no Sass variables found"
+          SASS_VARS_FOUND=$(find "dist-sass/css/" -type f -name "*.css" -print0 | xargs -0 --no-run-if-empty grep -F "\$" || true)
+          if [[ -z "$SASS_VARS_FOUND" ]]; then
+            echo "All good, no Sass variables found!"
             exit 0
           else
-            echo "Found Sass variables!"
+            echo "Found $(echo "$SASS_VARS_FOUND" | wc -l | bc) Sass variables:"
+            echo "$SASS_VARS_FOUND"
             exit 1
           fi