3a6cbf9de6
this deprecates the github.com/majestrate/srndv2 repo
17 lines
308 B
Go
17 lines
308 B
Go
package srnd
|
|
|
|
import (
|
|
"log"
|
|
"os/exec"
|
|
)
|
|
|
|
func ExecHook(config *HookConfig, group, msgid, ref string) {
|
|
cmd := exec.Command(config.exec, group, msgid, ref)
|
|
err := cmd.Run()
|
|
if err != nil {
|
|
b, _ := cmd.CombinedOutput()
|
|
log.Println("calling hook", config.name, "failed")
|
|
log.Println(string(b))
|
|
}
|
|
}
|