Closed codebling closed 7 years ago
I didn't get an issue which you try to solve with this pr.
Consider the test on line 121 of run.test.js
.
describe('do not run git-ignored scripts from hooks directory',
it('should ignore file with wrong permissions in hooks directory',
What is this testing? Files with wrong permissions will not be run, so this test is really a duplicate of the test on line 46, and so nothing related to git-ignored files is tested.
In fact, git-ignored files will often still be executed, if they are using non-trivial paths or if there is more than one git-ignored file in the git repository. See #30.
This PR ensures that git-ignored files are never executed, and that this functionality will also work on Windows.
Feel free to make changes as you see fit. I have this repo set up on a Windows env and several tests fail without Windows support.
Fixed in #41
Fixes #30.