Properly detect in valid provisioners
This commit is contained in:
parent
0a86deedf1
commit
7e1c313ff5
|
@ -23,11 +23,16 @@ module VagrantPlugins
|
||||||
@invalid = false
|
@invalid = false
|
||||||
@name = name
|
@name = name
|
||||||
|
|
||||||
|
# Attempt to find the provisioner...
|
||||||
|
if !Vagrant.plugin("2").manager.provisioners[name]
|
||||||
|
@logger.warn("Provisioner '#{name}' not found.")
|
||||||
|
@invalid = true
|
||||||
|
end
|
||||||
|
|
||||||
# Attempt to find the configuration class for this provider
|
# Attempt to find the configuration class for this provider
|
||||||
# if it exists and load the configuration.
|
# if it exists and load the configuration.
|
||||||
config_class = Vagrant.plugin("2").manager.provisioner_configs[@name]
|
config_class = Vagrant.plugin("2").manager.provisioner_configs[@name]
|
||||||
if !config_class
|
if !config_class
|
||||||
@invalid = true
|
|
||||||
@logger.info("Provisioner config for '#{@name}' not found. Ignoring config.")
|
@logger.info("Provisioner config for '#{@name}' not found. Ignoring config.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue