kernel/v2: clear ID field so its not passed to provisioner [GH-3424]

This commit is contained in:
Mitchell Hashimoto 2014-04-10 08:41:59 -07:00
parent b26a3c88aa
commit 541ebd8935
2 changed files with 5 additions and 4 deletions

View File

@ -14,6 +14,7 @@ BUG FIXES:
- core: `vagrant` on Windows cmd.exe doesn't always exit with exit
code zero. [GH-3420]
- core: Adding a box from a network share has nice error on Windows. [GH-3279]
- core: Setting an ID on a provisioner now works. [GH-3424]
- commands/package: Nice error if includes contain symlinks. [GH-3200]
- commands/rsync-auto: Don't crash if the machine can't be communicated
to. [GH-3419]

View File

@ -252,15 +252,15 @@ module VagrantPlugins
end
def provision(name, **options, &block)
options[:id] = options[:id].to_s if options[:id]
id = options.delete(:id).to_s if options.has_key?(:id)
prov = nil
if options[:id]
prov = @provisioners.find { |p| p.id == options[:id] }
if id
prov = @provisioners.find { |p| p.id == id }
end
if !prov
prov = VagrantConfigProvisioner.new(options[:id], name.to_sym)
prov = VagrantConfigProvisioner.new(id, name.to_sym)
@provisioners << prov
end