Validate push configuration in the environment
This commit is contained in:
parent
e828719c2f
commit
6b51526ba2
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue