Skip to content

Conversation

aliosv
Copy link

@aliosv aliosv commented Jan 17, 2016

No description provided.

lib/git-hooks.js Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it need for?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backslash, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
without it will be '....\node_modules\git-hooks\lib\git-hooks'

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using execSync for executing npm test is a bad idea because the script can reach buffer limit. Moreover, execSync doesn't proxy any output during execution; so, a user watches nothing but an empty screen. It's a bad UX.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exec().stdout.on('data') resolves problem. There is error occur if i spawn npm(npm enoent).

@tarmolov
Copy link
Owner

When the solution is summarized in #10, the pull request (or another one) will be opened .

@tarmolov tarmolov closed this Jun 13, 2016
This was referenced Nov 22, 2017
@codebling
Copy link

Anyone looking for Windows support should check out Husky. It's a very active project which allows you to set up git hooks in your package.json file. It supports OSX, linux and Windows and has support for a few other hooks which git-hooks-js does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants