@@ -10,6 +10,7 @@ import {
10
10
runSudo ,
11
11
} from '@react-native-community/cli-tools' ;
12
12
import runBundleInstall from './runBundleInstall' ;
13
+ import { execaPod } from './pods' ;
13
14
14
15
interface PodInstallOptions {
15
16
skipBundleInstall ?: boolean ;
@@ -31,7 +32,7 @@ async function runPodInstall(loader: Ora, options: RunPodInstallOptions) {
31
32
) } ${ chalk . dim ( '(this may take a few minutes)' ) } `,
32
33
) ;
33
34
34
- await execa ( 'bundle' , [ 'exec' , 'pod' , 'install' ] , {
35
+ await execaPod ( [ 'install' ] , {
35
36
env : {
36
37
RCT_NEW_ARCH_ENABLED : options ?. newArchEnabled ? '1' : '0' ,
37
38
RCT_IGNORE_PODS_DEPRECATION : '1' , // From React Native 0.79 onwards, users shouldn't install CocoaPods manually.
@@ -77,7 +78,7 @@ async function runPodUpdate(loader: Ora) {
77
78
'(this may take a few minutes)' ,
78
79
) } `,
79
80
) ;
80
- await execa ( 'pod' , [ 'repo' , 'update' ] ) ;
81
+ await execaPod ( [ 'repo' , 'update' ] ) ;
81
82
} catch ( error ) {
82
83
// "pod" command outputs errors to stdout (at least some of them)
83
84
logger . log ( ( error as any ) . stderr || ( error as any ) . stdout ) ;
@@ -151,7 +152,7 @@ async function installPods(loader?: Ora, options?: PodInstallOptions) {
151
152
// Check if "pod" is available and usable. It happens that there are
152
153
// multiple versions of "pod" command and even though it's there, it exits
153
154
// with a failure
154
- await execa ( 'pod' , [ '--version' ] ) ;
155
+ await execaPod ( [ '--version' ] ) ;
155
156
} catch ( e ) {
156
157
loader . info ( ) ;
157
158
await installCocoaPods ( loader ) ;
0 commit comments