Validate push configuration in the environment

This commit is contained in:
Seth Vargo 2015-01-07 11:43:26 -05:00
parent e828719c2f
commit 6b51526ba2
2 changed files with 6 additions and 5 deletions

View File

@ -556,6 +556,7 @@ module Vagrant
end
strategy, config = pushes[name]
push_registry = Vagrant.plugin("2").manager.pushes
klass, _ = push_registry.get(strategy)
if klass.nil?
@ -564,6 +565,11 @@ module Vagrant
pushes: push_registry.keys
end
# Validate the global push configuration and our local push configuration
machine = self.machine(self.machine_names.first, self.default_provider)
machine.action_raw(:config_validate, Vagrant::Action::Builtin::ConfigValidate)
config.validate(machine)
klass.new(self, config).push
end

View File

@ -19,11 +19,6 @@ module VagrantPlugins
name = validate_pushes!(@env.pushes, argv[0])
# Validate the configuration
@env.machine(@env.machine_names.first, @env.default_provider).action_raw(
:config_validate,
Vagrant::Action::Builtin::ConfigValidate)
@logger.debug("'push' environment with strategy: `#{name}'")
@env.push(name)