Skip to content

Couldn't find git_hooks.db file #62

@oliverswitzer

Description

@oliverswitzer

Hi,

As I understand it, hooks aren't version controlled. Also, when you clone a repository, this will not bring down the .git/hooks/* directory with it.

With that said, when I run mix deps.get, I get this error

==> git_hooks
Compiling 5 files (.ex)
↗ Installing git hooks...
⚠ Couldn't find git_hooks.db file, won't be able to restore old backups: %File.Error{action: "open", path: "/Users/oliverswitzer/workspace/fusign/deps/../.git/hooks/git_hooks.db", reason: :enoent}
⚠ Check that you are not missing `.git` folder, otherwise open a ticket at https://github.com/qgadrian/elixir_git_hooks/issues/new
Generated git_hooks app

I do not have a .git/hooks directory because I cloned this repo. Is it possible to initialize the hooks directory if it doesn't exist, instead of blowing up like this?

Handling version control of hooks seems like a main feature for this repo, so I was hoping that people cloning repos wouldn't have to get in the nitty gritty of creating the hooks directory themselves in order to use this lib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions