Commit 157db399 authored by Chris Roberts's avatar Chris Roberts
Browse files

Remove action name tracking for applying

The raw action name tracking should be sufficient for preventing
multi-insertions where only a single modification should occur.
With action name, hooks _should_ be able to be applied in multiple
builder stacks as they are expanding.

Fixes #12035
parent 30f8e794
Showing with 4 additions and 11 deletions
+4 -11
......@@ -173,23 +173,16 @@ module Vagrant
# be modified
builder = self.dup
if env[:builder_applied] != env[:action_name]
apply_action_name = true
env[:builder_applied] = env[:action_name]
end
# Apply all dynamic modifications of the stack. This
# will generate dynamic hooks for all actions within
# the stack, load any triggers for action classes, and
# apply them to the builder's stack
builder.apply_dynamic_updates(env)
if apply_action_name
# Now that the stack is fully expanded, apply any
# action hooks that may be defined so they are on
# the outermost locations of the stack
builder.apply_action_name(env)
end
# Now that the stack is fully expanded, apply any
# action hooks that may be defined so they are on
# the outermost locations of the stack
builder.apply_action_name(env)
# Wrap the middleware stack with the Warden to provide a consistent
# and predictable behavior upon exceptions.
......
Supports Markdown
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