File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ TMP="$(mktemp -d)"
77clean () { rm -rf " $TMP " ; }
88trap clean EXIT
99
10- git -C " $TMP " init
10+ ROOT= " $( dirname " $( dirname " $( pwd ) " ) " ) "
1111
1212cat << EOF > "$TMP /.pre-commit-config.yaml"
1313repos:
14- - repo: $( dirname " $( dirname " $( pwd ) " ) " )
14+ - repo: $ROOT
1515 rev: HEAD
1616 hooks:
1717 - id: sourcemeta-jsonschema-lint
@@ -25,11 +25,14 @@ cat << 'EOF' > "$TMP/schema.json"
2525}
2626EOF
2727
28+ git -C " $TMP " init
2829git -C " $TMP " add .
2930
3031cd " $TMP "
3132pre-commit install
32- pre-commit run --files schema.json > " $TMP /out.txt" 2>&1 && CODE=" $? " || CODE=" $? "
33+ PATH=" $ROOT /bin:$PATH " \
34+ pre-commit run --files schema.json > " $TMP /out.txt" 2>&1 \
35+ && CODE=" $? " || CODE=" $? "
3336cat " $TMP /out.txt"
3437test " $CODE " = " 1" || exit 1
3538grep -q " enum_with_type" " $TMP /out.txt" || exit 1
You can’t perform that action at this time.
0 commit comments