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: "Multiple Podfiles were found" due to vendor inclusion #1988

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

robhogan
Copy link
Collaborator

Summary:

cli-plugin-ios performs a glob search for Podfile as a heuristic for the ios project root. In a default installation, where Bundler installs Cocoapods as a gem into vendor, the vendored cocoapods directory itself contains a Podfile, and this leads to a harmless but noisy warning:

warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md

This amends the existing exclusion list for the Podfile search (which already hardcodes and exclusion for eg /node_modules/ to also exclude Bundler's equivalent, /vendor/.

Test Plan:

Made this change locally (I happen to be working in RN 0.71.11 but I don't think anything relevant has changed here)

Before

image

After

image

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

Thank you!

@thymikee thymikee merged commit f1e2417 into main Jun 29, 2023
@thymikee thymikee deleted the robhogan/exclude-vendor-dir-from-podfile-search branch June 29, 2023 15:10
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.

2 participants