Commit 8f0fef0e authored by Fabio Pelosin's avatar Fabio Pelosin

[fix] Hide the podfile section in the error template if it is not available

parent 76f8f785
......@@ -33,13 +33,7 @@ module Pod
Ruby lib dir : #{RbConfig::CONFIG['libdir']}
Repositories : #{repo_information.join("\n ")}
```
### Podfile
```ruby
#{Config.instance.project_podfile.read.strip if Config.instance.project_podfile}
```
#{markdown_podfile}
### Error
```
......@@ -64,6 +58,18 @@ EOS
private
def markdown_podfile
return "" if !Config.instance.project_podfile
<<-EOS
### Podfile
```ruby
#{Config.instance.project_podfile.read.strip}
```
EOS
end
def error_from_podfile(error)
if error.message =~ /Podfile:(\d*)/
"\nIt appears to have originated from your Podfile at line #{$1}.\n"
......
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