Skip to content

Commit

Permalink
fix: avoid negation use containsUnsupportedPodfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
okwasniewski committed Dec 21, 2023
1 parent 4eaea89 commit 6932ec8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli-platform-apple/src/config/findPodfilePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export default function findPodfilePath(
.sort((project) => (path.dirname(project) === platformName ? -1 : 1));

const supportedPlatformsArray: string[] = Object.values(supportedPlatforms);
const containsOnlySupportedPodfiles = podfiles.every((podfile) =>
supportedPlatformsArray.includes(podfile.split('/')[0]),
const containsUnsupportedPodfiles = podfiles.every(
(podfile) => !supportedPlatformsArray.includes(podfile.split('/')[0]),
);

if (podfiles.length > 0) {
if (podfiles.length > 1 && !containsOnlySupportedPodfiles) {
if (podfiles.length > 1 && containsUnsupportedPodfiles) {
logger.warn(
inlineString(`
Multiple Podfiles were found: ${podfiles}. Choosing ${podfiles[0]} automatically.
Expand Down

0 comments on commit 6932ec8

Please sign in to comment.