This commit is contained in:
Stefan Schubert 2025-08-18 21:20:17 +08:00 committed by GitHub
commit 8e9dd53837
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 0 deletions

View file

@ -587,6 +587,9 @@ func handleHook(h *hook.Hook, r *hook.Request) (string, error) {
}
cmd := exec.Command(cmdPath)
if h.RunAs != "" {
setUser(cmd, h.RunAs)
}
cmd.Dir = h.CommandWorkingDirectory
cmd.Args, errors = h.ExtractCommandArguments(r)