diff --git a/CHANGELOG.md b/CHANGELOG.md index e3424c102..91fef12da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Chef client now accepts an empty (`nil`) run list again. [GH-429] - Fix incorrect error message when running `provision` on halted VM. [GH-447] - Checking guest addition versions now ignores OSE. [GH-438] + - Chef solo from a remote URL fixed. [GH-431] ## 0.8.2 (July 22, 2011) diff --git a/lib/vagrant/provisioners/chef_solo.rb b/lib/vagrant/provisioners/chef_solo.rb index 7e7d0c4bb..b5572afa1 100644 --- a/lib/vagrant/provisioners/chef_solo.rb +++ b/lib/vagrant/provisioners/chef_solo.rb @@ -66,7 +66,15 @@ module Vagrant # or VM path. local_path = nil local_path = File.expand_path(path, env.root_path) if type == :host - remote_path = type == :host ? "#{config.provisioning_path}/chef-solo-#{self.class.get_and_update_counter}" : path + remote_path = nil + if type == :host + # Path exists on the host, setup the remote path + remote_path = "#{config.provisioning_path}/chef-solo-#{self.class.get_and_update_counter}" + else + # Path already exists on the virtual machine. Expand it + # relative to where we're provisioning. + remote_path = File.expand_path(path, config.provisioning_path) + end # Return the result [type, local_path, remote_path]