diff --git a/CHANGELOG.md b/CHANGELOG.md index 144357922..c00a62aab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb index 394394f84..30ab2ff3f 100644 --- a/plugins/kernel_v2/config/vm.rb +++ b/plugins/kernel_v2/config/vm.rb @@ -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