Commit 40298ba7 authored by Fabio Pelosin's avatar Fabio Pelosin

[Config] Use the pwd as installation root if no Podfile can be found

parent 3bdfb723
......@@ -134,6 +134,7 @@ module Pod
current_path = current_path.parent
end
end
@installation_root ||= Pathname.pwd
end
@installation_root
end
......@@ -181,7 +182,7 @@ module Pod
# @return [Nil]
#
def podfile_path
@podfile_path ||= podfile_path_in_dir(installation_root) if installation_root
@podfile_path ||= podfile_path_in_dir(installation_root)
end
# Returns the path of the Lockfile.
......
......@@ -59,9 +59,9 @@ module Pod
end
end
it "it returns a nil installation root if no Podfile can be found" do
it "it returns the working directory as the installation root if no Podfile can be found" do
Dir.chdir(temporary_directory) do
config.installation_root.should == nil
config.installation_root.should == temporary_directory
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment