Validate push configuration in the environment
This commit is contained in:
parent
e828719c2f
commit
6b51526ba2
|
@ -556,6 +556,7 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
strategy, config = pushes[name]
|
strategy, config = pushes[name]
|
||||||
|
|
||||||
push_registry = Vagrant.plugin("2").manager.pushes
|
push_registry = Vagrant.plugin("2").manager.pushes
|
||||||
klass, _ = push_registry.get(strategy)
|
klass, _ = push_registry.get(strategy)
|
||||||
if klass.nil?
|
if klass.nil?
|
||||||
|
@ -564,6 +565,11 @@ module Vagrant
|
||||||
pushes: push_registry.keys
|
pushes: push_registry.keys
|
||||||
end
|
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
|
klass.new(self, config).push
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,6 @@ module VagrantPlugins
|
||||||
|
|
||||||
name = validate_pushes!(@env.pushes, argv[0])
|
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}'")
|
@logger.debug("'push' environment with strategy: `#{name}'")
|
||||||
@env.push(name)
|
@env.push(name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue