Add error if both before and after options are set

This commit is contained in:
Brian Cain 2019-08-28 16:15:33 -07:00
parent 258ce7733c
commit 07bcfc6077
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
2 changed files with 6 additions and 0 deletions

View File

@ -115,6 +115,10 @@ module VagrantPlugins
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 !VALID_BEFORE_AFTER_TYPES.include?(@before)
if @before.is_a?(Symbol) && !VALID_BEFORE_AFTER_TYPES.include?(@before)

View File

@ -2487,6 +2487,8 @@ en:
provisioners:
base:
both_before_after_set: |-
Dependency provisioners cannot currently set both `before` and `after` options.
dependency_provisioner_dependency: |-
Dependency provisioner "%{name}" relies on another dependency provisioner "%{dep_name}". This is currently not supported.
invalid_alias_value: |-