VAGRANT_CWD can be set to set the CWD of `vagrant`.
This commit is contained in:
parent
ce00a56ecb
commit
6969f791ad
|
@ -7,6 +7,8 @@
|
||||||
TTY (and hence can't confirm). [GH-779]
|
TTY (and hence can't confirm). [GH-779]
|
||||||
- Fix an issue with the `:vagrantfile_name` option to `Vagrant::Environment`
|
- Fix an issue with the `:vagrantfile_name` option to `Vagrant::Environment`
|
||||||
not working properly. [GH-778]
|
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)
|
## 1.0.0 (March 6, 2012)
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ module Vagrant
|
||||||
}.merge(opts || {})
|
}.merge(opts || {})
|
||||||
|
|
||||||
# Set the default working directory to look for the vagrantfile
|
# 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] ||= Dir.pwd
|
||||||
opts[:cwd] = Pathname.new(opts[:cwd])
|
opts[:cwd] = Pathname.new(opts[:cwd])
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ describe Vagrant::Environment do
|
||||||
instance = described_class.new(:cwd => "foobarbaz")
|
instance = described_class.new(:cwd => "foobarbaz")
|
||||||
instance.cwd.should == Pathname.new("foobarbaz")
|
instance.cwd.should == Pathname.new("foobarbaz")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "is set to the environmental variable VAGRANT_CWD" do
|
||||||
|
pending "A good temporary ENV thing"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "home path" do
|
describe "home path" do
|
||||||
|
|
Loading…
Reference in New Issue