File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,15 +30,19 @@ jobs:
3030 node-version : ${{ matrix.node-version }}
3131 - run : npm i && npm i eslint istanbul typescript
3232 - run : node_modules/.bin/istanbul cover lib/ace/test/all.js
33- - run : changes=$(git diff --name-only origin/HEAD --no-renames --diff-filter=ACMR);
33+ - run : |
34+ set -x;
35+ changes=$(git diff --name-only origin/HEAD --no-renames --diff-filter=ACMR);
3436 if [ "$changes" == "" ]; then
3537 echo "checking all files";
3638 node node_modules/eslint/bin/eslint "lib/ace/**/*.js";
3739 else
38- changes=$(echo "$changes" | grep -P '.js$');
39- echo "checking $changes";
40- if [ "$changes" != "" ]; then
41- node node_modules/eslint/bin/eslint $changes;
40+ jsChanges=$(echo "$changes" | grep -P '.js$' || :);
41+ if [ "$jsChanges" == "" ]; then
42+ echo "nothing to check";
43+ else
44+ echo "checking $jsChanges";
45+ node node_modules/eslint/bin/eslint $jsChanges;
4246 fi
4347 fi
4448 # - run: npm run lint
You can’t perform that action at this time.
0 commit comments