File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -259,11 +259,14 @@ ${versionResolutionHint}`);
259259
260260 private overridePodsFromFile ( podfileContent : string , projectData : IProjectData , platformData : IPlatformData ) : string {
261261 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+ }
267270
268271 return podfileContent ;
269272 }
You can’t perform that action at this time.
0 commit comments