File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -259,11 +259,14 @@ ${versionResolutionHint}`);
259
259
260
260
private overridePodsFromFile ( podfileContent : string , projectData : IProjectData , platformData : IPlatformData ) : string {
261
261
const mainPodfilePath = this . getMainPodFilePath ( projectData , platformData ) ;
262
- const mainPodfileContent = this . $fs . readText ( mainPodfilePath ) ;
263
- const pods = this . getCocoaPodsFromPodfile ( mainPodfileContent ) ;
264
- _ . forEach ( pods , pod => {
265
- podfileContent = podfileContent . replace ( new RegExp ( `^[ ]*pod\\s*["']${ pod } ['"].*$` , "gm" ) , '#$&' ) ;
266
- } ) ;
262
+
263
+ if ( this . $fs . exists ( mainPodfilePath ) ) {
264
+ const mainPodfileContent = this . $fs . readText ( mainPodfilePath ) ;
265
+ const pods = this . getCocoaPodsFromPodfile ( mainPodfileContent ) ;
266
+ _ . forEach ( pods , pod => {
267
+ podfileContent = podfileContent . replace ( new RegExp ( `^[ ]*pod\\s*["']${ pod } ['"].*$` , "gm" ) , '#$&' ) ;
268
+ } ) ;
269
+ }
267
270
268
271
return podfileContent ;
269
272
}
You can’t perform that action at this time.
0 commit comments