diff options
| author | Pawel Stolowski <stolowski@gmail.com> | 2017-08-28 14:13:30 +0200 |
|---|---|---|
| committer | Pawel Stolowski <stolowski@gmail.com> | 2017-08-28 15:36:00 +0200 |
| commit | d832894f784a0151d542bf91bce29c9c68291263 (patch) | |
| tree | 9cd9924372b1fe06110f3c521bab986ca972081a | |
| parent | ea1a4626fd1be3792c0547ff4147ea02c5eb7237 (diff) | |
Don't check hookExists as it's always false in this case.
| -rw-r--r-- | overlord/hookstate/hookmgr.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/overlord/hookstate/hookmgr.go b/overlord/hookstate/hookmgr.go index 68543731f8..ecd5ff133a 100644 --- a/overlord/hookstate/hookmgr.go +++ b/overlord/hookstate/hookmgr.go @@ -227,7 +227,7 @@ func (m *HookManager) doRunHook(task *state.Task, tomb *tomb.Tomb) error { handlers := m.repository.generateHandlers(context) handlersCount := len(handlers) if handlersCount == 0 { - if hooksup.Optional && !hookExists { + if hooksup.Optional { return nil } return fmt.Errorf("internal error: no registered handlers for hook %q", hooksup.Hook) |
