Commit 9c8d8ea 1 parent fe61db4 commit 9c8d8ea Copy full SHA for 9c8d8ea
File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,21 @@ jobs:
30
30
node-version : ${{ matrix.node-version }}
31
31
- run : npm i && npm i eslint istanbul typescript
32
32
- 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
+ git status;
36
+ git checkout HEAD -- package.json;
37
+ changes=$(git diff --name-only origin/HEAD --no-renames --diff-filter=ACMR);
34
38
if [ "$changes" == "" ]; then
35
39
echo "checking all files";
36
40
node node_modules/eslint/bin/eslint "lib/ace/**/*.js";
37
41
else
38
- changes=$(echo "$changes" | grep -P '.js$');
39
- echo "checking $changes";
40
- if [ "$changes" != "" ]; then
41
- node node_modules/eslint/bin/eslint $changes;
42
+ jsChanges=$(echo "$changes" | grep -P '.js$' || :);
43
+ if [ "$jsChanges" == "" ]; then
44
+ echo "nothing to check";
45
+ else
46
+ echo "checking $jsChanges";
47
+ node node_modules/eslint/bin/eslint $jsChanges;
42
48
fi
43
49
fi
44
50
# - run: npm run lint
You can’t perform that action at this time.
0 commit comments