diff options
| author | Julien Déramond <[email protected]> | 2023-04-13 08:47:56 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-13 09:47:56 +0300 |
| commit | 5e3dc587afddc91d035087b0fb73eca037f3c712 (patch) | |
| tree | c70959db80873e552193c117b3aecd5d1096f388 /.github/workflows | |
| parent | b4befee506260d2b62705f3faec5142054feac6b (diff) | |
| download | bootstrap-5e3dc587afddc91d035087b0fb73eca037f3c712.tar.xz bootstrap-5e3dc587afddc91d035087b0fb73eca037f3c712.zip | |
node-sass workflow: improve error message when Sass vars are found (#38448)
Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/node-sass.yml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/.github/workflows/node-sass.yml b/.github/workflows/node-sass.yml index d83e3e70f..c558e447a 100644 --- a/.github/workflows/node-sass.yml +++ b/.github/workflows/node-sass.yml @@ -35,14 +35,15 @@ jobs: npx --package node-sass@latest node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist-sass/css/ ls -Al dist-sass/css - # Check that there are no Sass variables (`$`) - - name: Check built CSS files + - name: Check built CSS files for Sass variables 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 |
