Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Podfile): Avoid creating an empty Podfile on plugin install #1467

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Aug 18, 2024

Platforms affected

iOS

Motivation and Context

Closes GH-1365.

Description

Calling new Podfile(...) will create an empty Podfile in the project if it does not exist. If we don't have any pods to add for a given plugin, we can skip doing anything at all with the Podfile and avoid needlessly creating it.

Note: I moved an if block to do an early return, which de-indented the majority of the code in that function. This PR is easier to review with whitespace changes disabled.

Testing

Tested manually by creating a new project and installing the cordova-plugin-inappbrowser and confirmed that no Podfile was present in the platforms/ios directory.

Checklist

  • I've run the tests to see all new and existing tests pass
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)

@dpogue dpogue added this to the 8.0.0 milestone Aug 18, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 87.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 78.35%. Comparing base (fb8eeab) to head (a49ecf2).

Files Patch % Lines
lib/Api.js 87.50% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1467   +/-   ##
=======================================
  Coverage   78.35%   78.35%           
=======================================
  Files          16       16           
  Lines        1825     1825           
=======================================
  Hits         1430     1430           
  Misses        395      395           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@dpogue dpogue merged commit 495ab61 into apache:master Aug 20, 2024
10 checks passed
@dpogue dpogue deleted the podfile-fix branch August 20, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin creates an empty Podfile for some reason (problem for build services)
3 participants