MCPcopy Create free account
hub / github.com/dirk/quickhook / Run

Method Run

hooks/commit_msg.go:15–30  ·  view source on GitHub ↗
(messageFile string)

Source from the content-addressed store, hash-verified

13}
14
15func (hook *CommitMsg) Run(messageFile string) error {
16 executables, err := hook.Repo.FindHookExecutables(COMMIT_MSG_HOOK)
17 if err != nil {
18 return err
19 }
20 for _, executable := range executables {
21 result := runExecutable(hook.Repo.Root, executable, []string{}, "", messageFile)
22 if result.err == nil {
23 continue
24 }
25 result.printStderr()
26 result.printStdout()
27 os.Exit(FAILED_EXIT_CODE)
28 }
29 return nil
30}

Callers 3

TestPromptForInstallFunction · 0.45
TestFailingHookWithPtyFunction · 0.45
TestMutatingCanAccessGitFunction · 0.45

Calls 4

runExecutableFunction · 0.85
FindHookExecutablesMethod · 0.80
printStderrMethod · 0.80
printStdoutMethod · 0.80

Tested by 3

TestPromptForInstallFunction · 0.36
TestFailingHookWithPtyFunction · 0.36
TestMutatingCanAccessGitFunction · 0.36