Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install under a submodule #46

Closed
lferreirawork opened this issue Feb 17, 2016 · 5 comments
Closed

Can't install under a submodule #46

lferreirawork opened this issue Feb 17, 2016 · 5 comments

Comments

@lferreirawork
Copy link

When installing under a git submodule, installHooks() correctly finds a .git folder (for the submodule), but can't resolve(gitRoot, '.git/hooks'), resulting in the following error:

fs.js:747
  return binding.mkdir(pathModule._makeLong(path),
                 ^
Error: ENOTDIR, not a directory '/testproject/submodule/.git/hooks'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:747:18)
    at ensureHooksDirExists (/testproject/submodule/node_modules/ghooks/lib/install.js:78:38)
    at installHooks (/testproject/submodule/node_modules/ghooks/lib/install.js:41:5)
    at Object.<anonymous> (/testproject/submodule/node_modules/ghooks/bin/install:3:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
@kentcdodds
Copy link
Contributor

After looking into it a little bit, git references githooks in a different directory for submodules. I think we could use something like this to identify the correct directory to install our githooks.

Would you be willing to makeapullrequest.com?

@leandroferreira
Copy link

@kentcdodds will do

@ta2edchimp
Copy link
Collaborator

@leandroferreira @lferreirawork is this something you're actively working on?
If not, I'd be willing to take over.

A result may also relate to a possible solution for #66

@leandroferreira
Copy link

@ta2edchimp all yours!

@ta2edchimp
Copy link
Collaborator

Thanks for the feedback!

ta2edchimp added a commit to ta2edchimp/ghooks that referenced this issue Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants