Skip to content

Check for .git directory before attempting copy #10

@finnhodgkin

Description

@finnhodgkin

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:

  1. Run a check to see if the .git folder exists before copying - if it doesn't IO.puts an error message.
  2. Add the above, but also add an optional second config variable that points to the absolute path of the correct .git/hooks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions