lib/vagrant/action/builtin/provision.rb in vagrant-unbundled-1.9.1.1 vs lib/vagrant/action/builtin/provision.rb in vagrant-unbundled-1.9.5.1
- old
+ new
@@ -100,15 +100,20 @@
end
type_map = provisioner_type_map(env)
provisioner_instances(env).each do |p, options|
type_name = type_map[p]
- next if env[:provision_types] && \
- !env[:provision_types].include?(type_name) && \
- !env[:provision_types].include?(options[:name])
- # Don't run if sentinel is around and we're not always running
- next if !provision_enabled && options[:run] != :always
+ if options[:run] == :never
+ next if env[:provision_types].nil? || !env[:provision_types].include?(options[:name])
+ else
+ next if env[:provision_types] && \
+ !env[:provision_types].include?(type_name) && \
+ !env[:provision_types].include?(options[:name])
+
+ # Don't run if sentinel is around and we're not always running
+ next if !provision_enabled && options[:run] != :always
+ end
name = type_name
if options[:name]
name = "#{options[:name]} (#{type_name})"
end