commandHandler runs a hook by exec'ing its command under a shell.
| 214 | |
| 215 | // commandHandler runs a hook by exec'ing its command under a shell. |
| 216 | type commandHandler struct { |
| 217 | workingDir string |
| 218 | env []string |
| 219 | shell string |
| 220 | shellArgs []string |
| 221 | command string |
| 222 | } |
| 223 | |
| 224 | func (h *commandHandler) Run(ctx context.Context, input []byte) (HandlerResult, error) { |
| 225 | cmd := exec.CommandContext(ctx, h.shell, append(h.shellArgs, h.command)...) |
nothing calls this directly
no outgoing calls
no test coverage detected