[UI] Ensure printing a path does not raise

parent 3227fa60
......@@ -51,6 +51,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Daniel Tomlinson](https://github.com/dantoml)
[#5250](https://github.com/CocoaPods/CocoaPods/issues/5250)
* Ensure attempting to print a path in the error report doesn't itself error.
[Samuel Giddins](https://github.com/)
[#5541](https://github.com/CocoaPods/CocoaPods/issues/5541)
## 1.0.1 (2016-06-02)
......
......@@ -184,7 +184,11 @@ module Pod
if pathname
from_path = config.podfile_path.dirname if config.podfile_path
from_path ||= Pathname.pwd
path = Pathname(pathname).relative_path_from(from_path)
path = begin
Pathname(pathname).relative_path_from(from_path)
rescue
pathname
end
"`#{path}`"
else
''
......
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