Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Pod push default repo #709

merged 1 commit into from

4 participants


When using the pod push command, if a repo isn't passed, default to the master repo. This is also assuming no one's custom repo will end in .podspec


Looks good. The original implementation aimed to avoid pushing to the master repo by accident but I agree that it was a bit over paranoid. Feel free to merge it.


My thoughts were if you had push access to the master repo and weren't intentionally specifying another repo you probably meant to use master. Hoping the small addition I made to the docs will make it's usage easier to understand too though.

@keith keith merged commit ac413d4 into CocoaPods:master

1 check passed

Details default The Travis build passed

@irrationalfab @Keithbsmiley As @mikefrederick notes in the reference ticket, this no longer works. Was the patch not applied to 0.17.0 on purpose, or by accident?


The code is still here


It shouldn't because of:

        elsif @repo.end_with? ".podspec"
          @podspec = @repo
          @repo = "master"

Thanks, @Keithbsmiley, I probably shouldn’t do these things from my phone :)

Ok, I’m re-opening the other ticket so we now to check this.


@alloy @Keithbsmiley thanks for looking into this. It looks like I somehow had been using version 0.16.0, which does not have the logic that @Keithbsmiley just pointed out. This works just fine in 0.17.1. Sorry for the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 27, 2012
  1. @keith
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/cocoapods/command/push.rb
7 lib/cocoapods/command/push.rb
@@ -27,7 +27,12 @@ def initialize(argv)
@allow_warnings = argv.option('--allow-warnings')
@local_only = argv.option('--local-only')
@repo = argv.shift_argument
- @podspec = argv.shift_argument
+ if @repo.end_with? ".podspec"
+ @podspec = @repo
+ @repo = "master"
+ else
+ @podspec = argv.shift_argument
+ end
super unless argv.empty? && @repo
Something went wrong with that request. Please try again.