Closed klierik closed 10 years ago
The error
EISDIR, illegal operation on a directory
means that your "file" is either a directory or non existent. It could also be a chmod
/permission problem. But honestly with ../../../../
I don't wonder when this fails.
Btw, why are you targetting the main projects (Magento) git hooks folder? This imo is far from ideal and the opposite of portable. You could add another Gruntfile.js
to your projects root to target those hooks. Or you could try to set up your front end dev folder outside the Magento root directory. You could (for e.g.) use a Virtual Machine and symlink your themes folder so it lives outside the Magento root, etc.
Oh. Wait a second. After re-reading your definitions: Please read the documentation again (and then probably again).
template
option should point to an actual hook template and not to your .git/hooks
folder.'post-merge': 'autoupdate githooks build'
have to be actual tasks. githook
task itself. You will create an infinite loop...Hope that helps.
The error
EISDIR, illegal operation on a directory
means that your "file" is either a directory or non existent. It could also be a chmod/permission problem. But honestly with ../../../../ I don't wonder when this fails. The folder is present. I check it withcd
commad like:$ cd cd ./../../../../.git/hooks/ $ ls -la drwxr-xr-x 12 aleksej staff 408 Jul 30 00:25 . drwxr-xr-x 16 aleksej staff 544 Aug 1 17:13 .. -rw-r--r--@ 1 aleksej staff 6148 Jul 30 00:25 .DS_Store -rwxr-xr-x 1 aleksej staff 452 Jul 22 15:23 applypatch-msg.sample -rwxr-xr-x 1 aleksej staff 896 Jul 22 15:23 commit-msg.sample -rwxr-xr-x 1 aleksej staff 189 Jul 22 15:23 post-update.sample -rwxr-xr-x 1 aleksej staff 398 Jul 22 15:23 pre-applypatch.sample -rwxr-xr-x 1 aleksej staff 1642 Jul 22 15:23 pre-commit.sample -rwxr-xr-x 1 aleksej staff 1352 Jul 22 15:23 pre-push.sample -rwxr-xr-x 1 aleksej staff 4951 Jul 22 15:23 pre-rebase.sample -rwxr-xr-x 1 aleksej staff 1239 Jul 22 15:23 prepare-commit-msg.sample -rwxr-xr-x 1 aleksej staff 3611 Jul 22 15:23 update.sample
Btw, why are you targetting the main projects (Magento) git hooks folder? This imo is far from ideal and the opposite of portable. You could add another Gruntfile.js to your projects root to target those hooks. Or you could try to set up your front end dev folder outside the Magento root directory. You could (for e.g.) use a Virtual Machine and symlink your themes folder so it lives outside the Magento root, etc.
Because current grunt environment only for current theme. i don't need that file in Magento root. That's why i use path to .git/hooks
Oh. Wait a second. After re-reading your definitions: Please read the documentation again (and then probably again).
even if i make changes to:
/**
* GIT Hooks
*/
githooks: {
options: {
template: '<%= project.app %>/../../../../.git/hooks'
},
all: {
'pre-commit': 'build',
'post-merge': 'autoupdate build'
}
},
the problem is the same :(
Please read again what a template actually is. Hint: It's not in your .git/hooks
folder... and hint number two: *.sample
hooks won't run.
You should also decide which task should be running on which hook. There's no reason to run for e.g. build
on two different hooks.
Here is a resource to help you getting started with Git Hooks.
@franz-josef-kaiser, oh, now i understand. thanks you very much for reply. i see where is my problem.
so the best way it is create githook-file manually and put it in .git/hooks folder. this will work 100% for everyone :)
create githook-file manually and put it in .git/hooks folder. this will work 100% for everyone :)
True that :)
Hello. Thanks you for your package.
I try create grunt environment for Magento theme. There what i have:
Okay. I install grunt-githooks and add next code:
i try run
$ grunt githooks
and i get next:Can you tell me please where is my problem?
PS:
<%= project.app %>
path is: