Fix for permissions when re-provisioning chef.

https://github.com/mitchellh/vagrant/issues/748
This commit is contained in:
Justin Huff 2012-02-20 09:53:09 -08:00
parent af884e4b74
commit 32f7f98ef4
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ module Vagrant
temp.write(config_file)
temp.close
env[:vm].channel.upload(temp.path, File.join(config.provisioning_path, filename))
remote_file = File.join(config.provisioning_path, filename)
env[:vm].channel.sudo("rm #{remote_file}", :error_check => false)
env[:vm].channel.upload(temp.path, remote_file)
end
def setup_json