VAGRANT_CWD can be set to set the CWD of `vagrant`.

This commit is contained in:
Mitchell Hashimoto 2012-03-08 16:45:19 -08:00
parent ce00a56ecb
commit 6969f791ad
3 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,8 @@
TTY (and hence can't confirm). [GH-779]
- Fix an issue with the `:vagrantfile_name` option to `Vagrant::Environment`
not working properly. [GH-778]
- `VAGRANT_CWD` environmental variable can be used to set the CWD to
something other than the current directory.
## 1.0.0 (March 6, 2012)

View File

@ -56,6 +56,7 @@ module Vagrant
}.merge(opts || {})
# Set the default working directory to look for the vagrantfile
opts[:cwd] ||= ENV["VAGRANT_CWD"] if ENV.has_key?("VAGRANT_CWD")
opts[:cwd] ||= Dir.pwd
opts[:cwd] = Pathname.new(opts[:cwd])

View File

@ -20,6 +20,10 @@ describe Vagrant::Environment do
instance = described_class.new(:cwd => "foobarbaz")
instance.cwd.should == Pathname.new("foobarbaz")
end
it "is set to the environmental variable VAGRANT_CWD" do
pending "A good temporary ENV thing"
end
end
describe "home path" do