Skip to content

Cocoapods crashes on pod trunk push when there's a syntax error in the podspec #5541

@dlo

Description

@dlo

Report

What did you do?

pod trunk push

What did you expect to happen?

Upload my pod to CocoaPods Trunk.

What happened instead?

Ruby crashes.

CocoaPods Environment

Stack

   CocoaPods : 1.0.1
        Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
    RubyGems : 2.5.1
        Host : Mac OS X 10.11.5 (15F34)
       Xcode : 7.3.1 (7D1014)
         Git : git version 2.9.0
Ruby lib dir : /Users/dan/.rbenv/versions/2.3.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 32482f5cd5b2f58eb3a79fc2c036b6d5a2d867ed

Plugins

cocoapods-deintegrate : 1.0.0
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.0.0
cocoapods-try         : 1.0.0

Error

ArgumentError - different prefix: "" and "/Users/dan/Documents/Projects/TableViewPopoverPresenting"
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/2.3.0/pathname.rb:520:in `relative_path_from'
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:187:in `path'
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-trunk-1.0.0/lib/pod/command/trunk/push.rb:97:in `rescue in spec'
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-trunk-1.0.0/lib/pod/command/trunk/push.rb:94:in `spec'
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-trunk-1.0.0/lib/pod/command/trunk/push.rb:106:in `validate_podspec'
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-trunk-1.0.0/lib/pod/command/trunk/push.rb:61:in `run'
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Users/dan/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Project that demonstrates the issue

https://github.com/lionheart/TableViewPopoverPresenting/tree/b5de2cb6f6056844452b87fa436de73d55dc2717

Metadata

Metadata

Assignees

No one assigned

    Labels

    s4:awaiting validationA Pull Request that is waiting for validation by a CocoaPods Core Team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions