File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ defmodule Mix.Tasks.GitHooks.Install do
39
39
40
40
Printer . info ( "Installing git hooks..." )
41
41
42
+ ensure_hooks_folder_exists ( )
42
43
clean_missing_hooks ( )
43
44
track_configured_hooks ( )
44
45
@@ -111,10 +112,13 @@ defmodule Mix.Tasks.GitHooks.Install do
111
112
Printer . warn (
112
113
"Couldn't find git_hooks.db file, won't be able to restore old backups: #{ inspect ( error ) } "
113
114
)
115
+ end
114
116
115
- Printer . warn (
116
- "Check that you are not missing `.git` folder, otherwise open a ticket at https://github.com/qgadrian/elixir_git_hooks/issues/new"
117
- )
117
+ @ spec ensure_hooks_folder_exists ( ) :: any
118
+ defp ensure_hooks_folder_exists do
119
+ Project . deps_path ( )
120
+ |> Path . join ( "/../.git/hooks" )
121
+ |> File . mkdir_p ( )
118
122
end
119
123
120
124
@ spec clean_missing_hooks ( ) :: any
You can’t perform that action at this time.
0 commit comments