diff --git a/lib/vagrant-hostsupdater/HostsUpdater.rb b/lib/vagrant-hostsupdater/HostsUpdater.rb index b2e8fc0..1a03848 100644 --- a/lib/vagrant-hostsupdater/HostsUpdater.rb +++ b/lib/vagrant-hostsupdater/HostsUpdater.rb @@ -149,7 +149,7 @@ def addToHosts(entries) elsif Vagrant::Util::Platform.windows? require 'tmpdir' uuid = @machine.id || @machine.config.hostsupdater.id - tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid + '.cmd') + tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid.to_s + '.cmd') File.open(tmpPath, "w") do |tmpFile| entries.each { |line| tmpFile.puts(">>\"#{@@hosts_path}\" echo #{line}") } end