Skip to content

Commit 74afd42

Browse files
authored
test: fix syntax tests so they work when testing against builds repo (#1571)
When running tests against the builds repo, the package.json and yarn.lock files get updated. The syntax check only really cares about modifications to files in the syntaxes folder.
1 parent 6adec8f commit 74afd42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ yarn run test:lsp
2121

2222
# Syntaxes tests
2323
yarn run test:syntaxes
24-
if [[ -n "$(git status --porcelain)" ]]; then
24+
# Check git status to see if there are modified files
25+
STATUS="$(git status --porcelain)"
26+
echo $STATUS
27+
# If the status contains modified files in the syntaxes folder, they are out of date
28+
if [[ "$STATUS" == *"syntaxes"* ]]; then
2529
echo 'Syntax files are out-of-sync with source. Please run "yarn run build:syntaxes".'
2630
exit 1
2731
fi

0 commit comments

Comments
 (0)