From 1d1080589db36382f3f9e8e6af9a0ea14da1d26c Mon Sep 17 00:00:00 2001 From: Samuel Vaillant Date: Wed, 4 Jul 2018 14:36:05 +0200 Subject: [PATCH] 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. --- src/tasks/ios/install.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tasks/ios/install.js b/src/tasks/ios/install.js index 51adc32cf..d34d4424a 100644 --- a/src/tasks/ios/install.js +++ b/src/tasks/ios/install.js @@ -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...'); @@ -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();