At the mo when our module is loaded it copies priv/pre-commit to the parent module's .git/hooks directory. Sometimes the parent module might not be an initialised .git repo, or it could be a subfolder of an initialised repo. Two solutions to this:
Run a check to see if the .git folder exists before copying - if it doesn't IO.puts an error message.
Add the above, but also add an optional second config variable that points to the absolute path of the correct .git/hooks.
At the mo when our module is loaded it copies
priv/pre-commit
to the parent module's.git/hooks
directory. Sometimes the parent module might not be an initialised .git repo, or it could be a subfolder of an initialised repo. Two solutions to this:IO.puts
an error message..git/hooks
.