diff --git a/pkg/backy/backy.go b/pkg/backy/backy.go index 54661c2..c6cc03e 100644 --- a/pkg/backy/backy.go +++ b/pkg/backy/backy.go @@ -611,6 +611,9 @@ func (c *ConfigOpts) closeHostConnections() { } func (cmd *Command) ExecuteHooks(hookType string, opts *ConfigOpts) { + if cmd.Hooks == nil { + return + } switch hookType { case "error": for _, v := range cmd.Hooks.Error {