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 ...@@ -134,6 +134,7 @@ module Pod
current_path = current_path.parent current_path = current_path.parent
end end
end end
@installation_root ||= Pathname.pwd
end end
@installation_root @installation_root
end end
...@@ -181,7 +182,7 @@ module Pod ...@@ -181,7 +182,7 @@ module Pod
# @return [Nil] # @return [Nil]
# #
def podfile_path def podfile_path
@podfile_path ||= podfile_path_in_dir(installation_root) if installation_root @podfile_path ||= podfile_path_in_dir(installation_root)
end end
# Returns the path of the Lockfile. # Returns the path of the Lockfile.
......
...@@ -59,9 +59,9 @@ module Pod ...@@ -59,9 +59,9 @@ module Pod
end end
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 Dir.chdir(temporary_directory) do
config.installation_root.should == nil config.installation_root.should == temporary_directory
end end
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