Skip to content

Commit

Permalink
Error msg now includes YAML by default, only includes file path if pr…
Browse files Browse the repository at this point in the history
…esent
  • Loading branch information
tayhalla committed Jul 25, 2014
1 parent 658e750 commit a1d46dc
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/cocoapods-core/yaml_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,8 @@ def yaml_has_merge_error?(yaml_string)
def yaml_merge_conflict_msg(yaml, path = nil)
err = "ERROR: Parsing unable to continue due "
err += "to merge conflicts present in:\n"
if path
err += "the file located at #{path}\n"
else
err += "#{yaml}"
end
err += "the file located at #{path}\n" unless !path
err += "#{yaml}"
end

# Error message describing a general error took happened
Expand All @@ -196,11 +193,8 @@ def yaml_merge_conflict_msg(yaml, path = nil)
def yaml_parsing_error_msg(yaml, path = nil)
err = "ERROR: Parsing unable to continue due "
err += "to parsing error:\n"
if path
err += "contained in the file located at #{path}\n"
else
err += "#{yaml}"
end
err += "contained in the file located at #{path}\n" unless !path
err += "#{yaml}"
end

#-----------------------------------------------------------------------#
Expand Down

0 comments on commit a1d46dc

Please sign in to comment.