1 Commits

Author SHA1 Message Date
9d646297c7 fix: check for nil Command.Hooks in ExecuteHooks [#12] 2024-11-15 10:46:27 -06:00

View File

@ -611,6 +611,9 @@ func (c *ConfigOpts) closeHostConnections() {
} }
func (cmd *Command) ExecuteHooks(hookType string, opts *ConfigOpts) { func (cmd *Command) ExecuteHooks(hookType string, opts *ConfigOpts) {
if cmd.Hooks == nil {
return
}
switch hookType { switch hookType {
case "error": case "error":
for _, v := range cmd.Hooks.Error { for _, v := range cmd.Hooks.Error {