Commit 1bffe1cd authored by Fabio Pelosin's avatar Fabio Pelosin

[LocalPod] Fix made license_file always return the absolute path.

parent 85c65849
...@@ -116,8 +116,11 @@ module Pod ...@@ -116,8 +116,11 @@ module Pod
end end
def license_file def license_file
file = top_specification.license[:file] if top_specification.license if top_specification.license && top_specification.license[:file]
file || expanded_paths(%w[ LICENSE{*,.*} licence{*,.*} ]).first root + top_specification.license[:file]
else
expanded_paths(%w[ LICENSE{*,.*} licence{*,.*} ]).first
end
end end
def license_text def license_text
...@@ -125,7 +128,7 @@ module Pod ...@@ -125,7 +128,7 @@ module Pod
if (result = license_hash[:text]) if (result = license_hash[:text])
result result
elsif license_file elsif license_file
result = IO.read(root + license_file) result = IO.read(license_file)
end end
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