Add a check for merge conflict markers in YAML files #1847

Closed
orta opened this Issue Feb 27, 2014 · 4 comments

5 participants

@orta
CocoaPods member

You get a non-trivial to figure error report:

Psych::SyntaxError - (<unknown>): could not find expected ':' while scanning a simple key at line 14 column 1
/Users/orta/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:205:in `parse'
/Users/orta/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
/Users/orta/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:153:in `parse'
/Users/orta/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:129:in `load'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-core-0.29.0/lib/cocoapods-core/lockfile.rb:43:in `from_file'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.29.0/lib/cocoapods/config.rb:208:in `lockfile'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:36:in `run_install_with_update'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:68:in `run'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/gems/claide-0.4.0/lib/claide/command.rb:213:in `run'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/bin/pod:23:in `load'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/bin/pod:23:in `<main>'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/Users/orta/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'

From:

PODS:
  - Kiwi (2.2)
  - ObjectiveSugar (1.1.1)

DEPENDENCIES:
  - Kiwi
  - ObjectiveSugar (from `../`)

EXTERNAL SOURCES:
  ObjectiveSugar:
    :path: ../

SPEC CHECKSUMS:
<<<<<<< HEAD
  Kiwi: 05f988748c5136c6daed8dab3563eca929399a72
  ObjectiveSugar: 7377622e35ec89ce893b05dd0af4bede211b01a4
=======
  Kiwi: db174bba4ee8068b15d7122f1b22fb64b7c1d378
  ObjectiveSugar: 27c680bb74f0b0415e9e743d5d61d77bc3292d3f
>>>>>>> b65623cbf5e105acbc3e2dec48f8024fa82003ce

COCOAPODS: 0.29.0

Where an error message would be super useful for a lot of people.

@alloy
CocoaPods member

I guess we could rescue Psych::SyntaxError and check if the input contains <<<<<<< HEAD and if so print an informative error message or otherwise re-raise.

@kylef

Perhaps the CocoaPods-version.yml file too #1853

@fabiopelosin fabiopelosin changed the title from Add a check for merge conflict markers in Podfile.lock to Add a check for merge conflict markers in YAML files Mar 27, 2014
@fabiopelosin
CocoaPods member

Yep this logic should be applied to all the YAML files (I've changed the tile accordingly)

@kylef kylef assigned kylef and unassigned kylef Mar 27, 2014
@CocoaPodsBot CocoaPodsBot was assigned by orta Mar 29, 2014
@CocoaPodsBot

Closed for duplicating CocoaPods/Core#69 by @joelparsons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment