Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ var git = path.resolve(root, '.git')
, hooks = path.resolve(git, 'hooks')
, precommit = path.resolve(hooks, 'pre-commit');

//
// Bail out if we are on Windows because the `hook` file only works
// on bash-compatible systems
//
if (process.platform === 'win32') {
console.error('pre-commit:');
console.error('pre-commit: Refusing to install on Windows.');
console.error('pre-commit:');
console.error('pre-commit: The hook was not installed.');
console.error('pre-commit:');
}

//
// Bail out if we don't have an `.git` directory as the hooks will not get
// triggered. If we do have directory create a hooks folder if it doesn't exist.
Expand Down