Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 1d10805

Browse files
samoussfrancoischalifour
authored andcommitted
fix(ios): run pod repo update before install (#72)
The CocoaPods installation fails if it's your first CocoaPods install. We run the command `pod repo update` before each install to avoid this.
1 parent aa061f8 commit 1d10805

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/tasks/ios/install.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ const chalk = require('chalk');
44
module.exports = function install(config) {
55
const logger = config.silent ? { log() {}, error() {} } : console;
66
const initialDirectory = process.cwd();
7+
const execSyncOptions = {
8+
stdio: config.silent ? 'ignore' : 'inherit',
9+
};
710

811
logger.log();
912
logger.log('📦 Installing dependencies...');
@@ -12,9 +15,8 @@ module.exports = function install(config) {
1215
process.chdir(config.path);
1316

1417
try {
15-
execSync('pod install', {
16-
stdio: config.silent ? 'ignore' : 'inherit',
17-
});
18+
execSync('pod repo update', execSyncOptions);
19+
execSync('pod install', execSyncOptions);
1820
} catch (err) {
1921
logger.log();
2022
logger.log();

0 commit comments

Comments
 (0)