wecodemore / grunt-githooks

A Grunt plugin to help bind Grunt tasks to Git hooks
https://npmjs.org/package/grunt-githooks
MIT License
317 stars 24 forks source link

How to not have `cwd` hard code #24

Open franz-josef-kaiser opened 10 years ago

franz-josef-kaiser commented 10 years ago

I was just trying this plugin and playing around with it. I couldn't wrap my head around.

Hard coded cwd in newly added hook

How would we share a Gruntfile.js with a team when the path is bound to our local hard drive? (Code below from Issue #11 ). Other team members might have a completely different setup. Is this plugin meant to be used by a single person on a single machine only?

exec( 'grunt jshint', {
    cwd: 'C:\Users\etc\'
}, function ( err, stdout, stderr ) {} )