Skip to content

Commit

Permalink
use findPodfilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
TMisiukiewicz committed Sep 18, 2023
1 parent e16e3fb commit e4675c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/cli-platform-ios/src/tools/pods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
getLoader,
} from '@react-native-community/cli-tools';
import installPods from './installPods';
import findPodfilePath from '../config/findPodfilePath';

interface ResolvePodsOptions {
forceInstall?: boolean;
Expand Down Expand Up @@ -40,7 +41,12 @@ export default async function resolvePods(
options?: ResolvePodsOptions,
) {
const packageJson = getPackageJson(root);
const podsPath = path.join(root, 'ios', 'Pods');
const podfilePath = findPodfilePath(root);
const iosFolderPath = podfilePath
? podfilePath.slice(0, podfilePath.lastIndexOf('/'))
: path.join(root, 'ios');
const podsPath = path.join(iosFolderPath, 'Pods');
console.log({podsPath});
const arePodsInstalled = fs.existsSync(podsPath);
const dependencies = normalizeDependencies({
...packageJson.dependencies,
Expand Down

0 comments on commit e4675c1

Please sign in to comment.