mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-11 01:30:06 -04:00
packer: reset runningHook when done
This commit is contained in:
parent
e210151408
commit
30bf8ffc7d
1 changed files with 7 additions and 0 deletions
|
|
@ -42,6 +42,13 @@ func (h *DispatchHook) Run(name string, ui Ui, comm Communicator, data interface
|
|||
h.cancelled = false
|
||||
h.l.Unlock()
|
||||
|
||||
// Make sure when we exit that we reset the running hook.
|
||||
defer func() {
|
||||
h.l.Lock()
|
||||
defer h.l.Unlock()
|
||||
h.runningHook = nil
|
||||
}()
|
||||
|
||||
hooks, ok := h.Mapping[name]
|
||||
if !ok {
|
||||
// No hooks for that name. No problem.
|
||||
|
|
|
|||
Loading…
Reference in a new issue