hookCreate is the callback function for create hook command
(hooksPath string, isReplace bool)
| 21 | |
| 22 | // hookCreate is the callback function for create hook command |
| 23 | func hookCreate(hooksPath string, isReplace bool) error { |
| 24 | if hooksPath == "" { |
| 25 | hooksPath = filepath.Join(".", defaultHooksPath) |
| 26 | } |
| 27 | hooksPath = filepath.Clean(hooksPath) |
| 28 | return createHooks(hooksPath, isReplace) |
| 29 | } |
| 30 | |
| 31 | func initHooks(confPath, hookFlag string, isGlobal, isReplace bool) (string, error) { |
| 32 | hookDir, err := getHookDir(hookFlag, isGlobal) |
no test coverage detected