Skip to content

Commit fba2d9e

Browse files
authored
chore: Fix pre-commit hooks for filenames with spaces, on Windows (#2622)
* Add quotes around {staged_files}. Suggested by @claremacrae ; tested and confirmed to fix pre-commit fatal error. * refactor: Convert back to Unix line-endings, as per original
1 parent 2164231 commit fba2d9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lefthook.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ pre-commit:
1515
commands:
1616
lint:
1717
glob: '*.ts'
18-
run: yarn lint {staged_files} && git add {staged_files}
18+
run: yarn lint "{staged_files}" && git add "{staged_files}"
1919
lint-markdown:
2020
glob: '*.md'
21-
run: yarn lint:markdown && git add {staged_files}
21+
run: yarn lint:markdown && git add "{staged_files}"
2222
test:
2323
glob: '*.ts'
24-
run: yarn test {staged_files} --findRelatedTests --passWithNoTests
24+
run: yarn test "{staged_files}" --findRelatedTests --passWithNoTests

0 commit comments

Comments
 (0)