Skip to content

Commit

Permalink
fix(ios): run pod repo update before install (algolia/create-instants…
Browse files Browse the repository at this point in the history
…earch-app#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.
  • Loading branch information
samouss authored and francoischalifour committed Jul 4, 2018
1 parent 8e52396 commit 63f6ed1
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 63f6ed1

Please sign in to comment.