observing / pre-commit

Automatically installs a git pre-commit script in your git repository which runs your `npm test` on pre-commit
MIT License
1.88k stars 150 forks source link

Fix pre-commit on Windows #68

Closed bbondy closed 8 years ago

bbondy commented 8 years ago

Symlink requires admin on Windows

coveralls commented 8 years ago

Coverage Status

Coverage increased (+4.6%) to 100.0% when pulling dd0e76eca76c7f58804eb1207c9bee1dd818fe63 on brave:master into 2abd42bcc9a9ea6b724c71af6c3c6ab1e7a54ed6 on observing:master.

3rd-Eden commented 8 years ago

You're running async code in a sync flow so things like that try/catch statement is not going to work if the operation fails. This makes very little sense and will cause major issues.

The reason that we symlink is because we need to keep references to the node_modules folder that githook uses. I don't know if this will still work if we copy the file to a completely different directory.

bbondy commented 8 years ago

ya it should be sync. It might make very little sense but it does work for Windows when using a pre-commit lint and the package as is does not work on Windows.