Add error if both before and after options are set
This commit is contained in:
parent
258ce7733c
commit
07bcfc6077
|
@ -115,6 +115,10 @@ module VagrantPlugins
|
||||||
|
|
||||||
provisioner_names = provisioners.map { |i| i.name if i.name != name }.reject(&:nil?)
|
provisioner_names = provisioners.map { |i| i.name if i.name != name }.reject(&:nil?)
|
||||||
|
|
||||||
|
if @before && @after
|
||||||
|
errors << I18n.t("vagrant.provisioners.base.both_before_after_set")
|
||||||
|
end
|
||||||
|
|
||||||
if @before
|
if @before
|
||||||
if !VALID_BEFORE_AFTER_TYPES.include?(@before)
|
if !VALID_BEFORE_AFTER_TYPES.include?(@before)
|
||||||
if @before.is_a?(Symbol) && !VALID_BEFORE_AFTER_TYPES.include?(@before)
|
if @before.is_a?(Symbol) && !VALID_BEFORE_AFTER_TYPES.include?(@before)
|
||||||
|
|
|
@ -2487,6 +2487,8 @@ en:
|
||||||
|
|
||||||
provisioners:
|
provisioners:
|
||||||
base:
|
base:
|
||||||
|
both_before_after_set: |-
|
||||||
|
Dependency provisioners cannot currently set both `before` and `after` options.
|
||||||
dependency_provisioner_dependency: |-
|
dependency_provisioner_dependency: |-
|
||||||
Dependency provisioner "%{name}" relies on another dependency provisioner "%{dep_name}". This is currently not supported.
|
Dependency provisioner "%{name}" relies on another dependency provisioner "%{dep_name}". This is currently not supported.
|
||||||
invalid_alias_value: |-
|
invalid_alias_value: |-
|
||||||
|
|
Loading…
Reference in New Issue