     }
   }
 
-  private static func findPrivateCocoaPodsRepo(repo: String, gitRoot: URL) -> String {
+  private static func findPrivateCocoaPodsRepo(repo: String, gitRoot: URL) -> String? {
     let command = "pod repo list | grep -B2 \(repo) | head -1"
     let result = Shell.executeCommandFromScript(command, workingDir: gitRoot)
     switch result {


  private static func push(to destination: Destination, gitRoot: URL) {
    let cpdcRepo = "sso://cpdc-internal/firebase"
    let cpdcLocation = findPrivateCocoaPodsRepo(repo: cpdcRepo, gitRoot: gitRoot)
    let stagingRepo = "git@github.com:firebase/SpecsStaging"
    let stagingLocation = findPrivateCocoaPodsRepo(repo: stagingRepo, gitRoot: gitRoot)
    let manifest = FirebaseManifest.shared

    for pod in manifest.pods.filter({ $0.releasing }) {

            pushCommands =
              "pod repo push --skip-tests --use-json \(warningsOK) \(stagingLocation) " +
              pod.skipImportValidation() + " \(pod.podspecName()) " +
              "--sources=\(stagingRepo).git,https://cdn.cocoapods.org && "
          }
          pushCommands += "pod repo push --skip-tests --use-json \(warningsOK) \(cpdcLocation) " +
            pod.skipImportValidation() + " \(pod.podspecName()) " +
