Skip to content

Commit 75a0e19

Browse files
committed
move iosFolderPath to options
1 parent 853f3ba commit 75a0e19

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

packages/cli-platform-ios/src/tools/installPods.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import runBundleInstall from './runBundleInstall';
1414
interface PodInstallOptions {
1515
skipBundleInstall?: boolean;
1616
newArchEnabled?: boolean;
17+
iosFolderPath?: string;
1718
}
1819

1920
interface RunPodInstallOptions {
@@ -121,18 +122,14 @@ async function installCocoaPods(loader: Ora) {
121122
}
122123
}
123124

124-
async function installPods(
125-
loader?: Ora,
126-
iosFolderPath?: string,
127-
options?: PodInstallOptions,
128-
) {
125+
async function installPods(loader?: Ora, options?: PodInstallOptions) {
129126
loader = loader || new NoopLoader();
130127
try {
131-
if (!iosFolderPath && !fs.existsSync('ios')) {
128+
if (!options?.iosFolderPath && !fs.existsSync('ios')) {
132129
return;
133130
}
134131

135-
process.chdir(iosFolderPath ?? 'ios');
132+
process.chdir(options?.iosFolderPath ?? 'ios');
136133

137134
const hasPods = fs.existsSync('Podfile');
138135

packages/cli-platform-ios/src/tools/pods.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ async function install(
6666
) {
6767
const loader = getLoader('Installing CocoaPods...');
6868
try {
69-
await installPods(loader, iosFolderPath, {
69+
await installPods(loader, {
7070
skipBundleInstall: !!cachedDependenciesHash,
71+
iosFolderPath,
7172
});
7273
cacheManager.set(packageJson.name, 'dependencies', currentDependenciesHash);
7374
loader.succeed();
@@ -120,6 +121,7 @@ export default async function resolvePods(
120121
await installPods(loader, {
121122
skipBundleInstall: !!cachedDependenciesHash,
122123
newArchEnabled: options?.newArchEnabled,
124+
iosFolderPath,
123125
});
124126
cacheManager.set(
125127
packageJson.name,

0 commit comments

Comments
 (0)