Properly detect in valid provisioners

This commit is contained in:
Mitchell Hashimoto 2013-03-30 14:39:29 -07:00
parent 0a86deedf1
commit 7e1c313ff5
1 changed files with 6 additions and 1 deletions

View File

@ -23,11 +23,16 @@ module VagrantPlugins
@invalid = false
@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
# if it exists and load the configuration.
config_class = Vagrant.plugin("2").manager.provisioner_configs[@name]
if !config_class
@invalid = true
@logger.info("Provisioner config for '#{@name}' not found. Ignoring config.")
return
end