From 7518bf94eb251e9419b73a50f2f564b310f8d003 Mon Sep 17 00:00:00 2001 From: Charles Blaxland Date: Tue, 17 Dec 2013 17:35:46 +1100 Subject: [PATCH] Force rm of chef config files #2669 --- plugins/provisioners/chef/provisioner/base.rb | 4 ++-- plugins/provisioners/chef/provisioner/chef_solo.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/provisioners/chef/provisioner/base.rb b/plugins/provisioners/chef/provisioner/base.rb index 312905f7b..17fa41388 100644 --- a/plugins/provisioners/chef/provisioner/base.rb +++ b/plugins/provisioners/chef/provisioner/base.rb @@ -79,7 +79,7 @@ module VagrantPlugins remote_file = File.join(config.provisioning_path, filename) @machine.communicate.tap do |comm| - comm.sudo("rm #{remote_file}", :error_check => false) + comm.sudo("rm -f #{remote_file}", :error_check => false) comm.upload(temp.path, remote_file) end end @@ -100,7 +100,7 @@ module VagrantPlugins remote_file = File.join(@config.provisioning_path, "dna.json") @machine.communicate.tap do |comm| - comm.sudo("rm #{remote_file}", :error_check => false) + comm.sudo("rm -f #{remote_file}", :error_check => false) comm.upload(temp.path, remote_file) end end diff --git a/plugins/provisioners/chef/provisioner/chef_solo.rb b/plugins/provisioners/chef/provisioner/chef_solo.rb index e9aebf248..3e2853325 100644 --- a/plugins/provisioners/chef/provisioner/chef_solo.rb +++ b/plugins/provisioners/chef/provisioner/chef_solo.rb @@ -116,7 +116,7 @@ module VagrantPlugins def upload_encrypted_data_bag_secret @machine.env.ui.info I18n.t("vagrant.provisioners.chef.upload_encrypted_data_bag_secret_key") @machine.communicate.tap do |comm| - comm.sudo("rm #{@config.encrypted_data_bag_secret}", :error_check => false) + comm.sudo("rm -f #{@config.encrypted_data_bag_secret}", :error_check => false) comm.upload(encrypted_data_bag_secret_key_path, @config.encrypted_data_bag_secret) end