File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
packages/cli-platform-ios/src/tools Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import runBundleInstall from './runBundleInstall';
14
14
interface PodInstallOptions {
15
15
skipBundleInstall ?: boolean ;
16
16
newArchEnabled ?: boolean ;
17
+ iosFolderPath ?: string ;
17
18
}
18
19
19
20
interface RunPodInstallOptions {
@@ -121,18 +122,14 @@ async function installCocoaPods(loader: Ora) {
121
122
}
122
123
}
123
124
124
- async function installPods (
125
- loader ?: Ora ,
126
- iosFolderPath ?: string ,
127
- options ?: PodInstallOptions ,
128
- ) {
125
+ async function installPods ( loader ?: Ora , options ?: PodInstallOptions ) {
129
126
loader = loader || new NoopLoader ( ) ;
130
127
try {
131
- if ( ! iosFolderPath && ! fs . existsSync ( 'ios' ) ) {
128
+ if ( ! options ?. iosFolderPath && ! fs . existsSync ( 'ios' ) ) {
132
129
return ;
133
130
}
134
131
135
- process . chdir ( iosFolderPath ?? 'ios' ) ;
132
+ process . chdir ( options ?. iosFolderPath ?? 'ios' ) ;
136
133
137
134
const hasPods = fs . existsSync ( 'Podfile' ) ;
138
135
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ async function install(
66
66
) {
67
67
const loader = getLoader ( 'Installing CocoaPods...' ) ;
68
68
try {
69
- await installPods ( loader , iosFolderPath , {
69
+ await installPods ( loader , {
70
70
skipBundleInstall : ! ! cachedDependenciesHash ,
71
+ iosFolderPath,
71
72
} ) ;
72
73
cacheManager . set ( packageJson . name , 'dependencies' , currentDependenciesHash ) ;
73
74
loader . succeed ( ) ;
@@ -120,6 +121,7 @@ export default async function resolvePods(
120
121
await installPods ( loader , {
121
122
skipBundleInstall : ! ! cachedDependenciesHash ,
122
123
newArchEnabled : options ?. newArchEnabled ,
124
+ iosFolderPath,
123
125
} ) ;
124
126
cacheManager . set (
125
127
packageJson . name ,
You can’t perform that action at this time.
0 commit comments