@@ -89,7 +89,7 @@ enum CocoaPodUtils {
89
89
static func cleanPodCache( ) {
90
90
let result = Shell . executeCommandFromScript ( " pod cache clean --all " , outputToConsole: false )
91
91
switch result {
92
- case let . error( code) :
92
+ case let . error( code, _ ) :
93
93
fatalError ( " Could not clean the pod cache, the command exited with \( code) . Try running the " +
94
94
" command in Terminal to see what's wrong. " )
95
95
case . success:
@@ -413,15 +413,23 @@ enum CocoaPodUtils {
413
413
414
414
// Loop through the subspecs passed in and use the actual Pod name.
415
415
for pod in pods {
416
- podfile += " pod ' \( pod. name) ' "
417
416
let podspec = String ( pod. name. split ( separator: " / " ) [ 0 ] + " .podspec " )
418
417
// Check if we want to use a local version of the podspec.
419
418
if let localURL = LaunchArgs . shared. localPodspecPath,
420
419
FileManager . default
421
420
. fileExists ( atPath: localURL. appendingPathComponent ( podspec) . path) {
422
- podfile += " , :path => ' \( localURL. path) ' "
421
+ podfile += " pod ' \( pod . name ) ' , :path => '\( localURL. path) ' "
423
422
} else if let podVersion = pod. version {
424
- podfile += " , ' \( podVersion) ' "
423
+ podfile += " pod ' \( pod. name) ', ' \( podVersion) ' "
424
+ } else if pod. name. starts ( with: " Firebase " ) ,
425
+ let localURL = LaunchArgs . shared. localPodspecPath,
426
+ FileManager . default
427
+ . fileExists ( atPath: localURL. appendingPathComponent ( " Firebase.podspec " ) . path) {
428
+ // Let Firebase.podspec force the right version for unspecified closed Firebase pods.
429
+ let podString = pod. name. replacingOccurrences ( of: " Firebase " , with: " " )
430
+ podfile += " pod 'Firebase/ \( podString) ', :path => ' \( localURL. path) ' "
431
+ } else {
432
+ podfile += " pod ' \( pod. name) ' "
425
433
}
426
434
if pod. version != nil {
427
435
// Don't add Google pods if versions were specified or we're doing a secondary install
0 commit comments