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

Commit

Permalink
fix(ios): run pod repo update before install (#72)
Browse files Browse the repository at this point in the history
The CocoaPods installation fails if it's your first CocoaPods install. We run the command `pod repo update` before each install to avoid this.
  • Loading branch information
samouss authored and francoischalifour committed Jul 4, 2018
1 parent aa061f8 commit 1d10805
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/tasks/ios/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const chalk = require('chalk');
module.exports = function install(config) {
const logger = config.silent ? { log() {}, error() {} } : console;
const initialDirectory = process.cwd();
const execSyncOptions = {
stdio: config.silent ? 'ignore' : 'inherit',
};

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

try {
execSync('pod install', {
stdio: config.silent ? 'ignore' : 'inherit',
});
execSync('pod repo update', execSyncOptions);
execSync('pod install', execSyncOptions);
} catch (err) {
logger.log();
logger.log();
Expand Down

0 comments on commit 1d10805

Please sign in to comment.