fix: check for nil Command.Hooks in ExecuteHooks [#12]
This commit is contained in:
parent
bf8d261cf3
commit
9d646297c7
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user