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

Question: js file cannot be added to index while git hook is running on Mac OS X #35

Closed dmytro-shchurov closed 9 years ago

dmytro-shchurov commented 9 years ago

Gentlemen, there is a situation completely unknown to me. My git hook bumps an app version by modifying a corresponding values in package.json, config.xml, and configuration.js. To let the scripts work on staged files only, I call git stash first, if it's important for the problem. Thus, after git script complete I have those three files different to indexed versions. Then, at it's mentioned in in a template, I call ('child_process').exec.('git add --update --' + list_of_modified_files). It works fine with json, and xml files, but returns /bin/sh: line 1: src/www/js/configuration/configuration.js: Permission denied for the latest one. There is no git group nor user in Mac OS X. All commands are executed with my credentials. This also happens when I run a hook script directly. I wonder, is this a git, or node, or OS issue? Can somebody let me know pls?

franz-josef-kaiser commented 9 years ago

This is a permission problem with your OS. You may want to ask this on ServerFault. Sorry, but I can't help you there.