Commit 30bf8ffc authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: reset runningHook when done

parent e2101514
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment