diff --git a/.flowconfig b/.flowconfig index 0563c1419..028f9aaac 100644 --- a/.flowconfig +++ b/.flowconfig @@ -27,7 +27,7 @@ esproposal.export_star_as=enable esproposal.optional_chaining=enable esproposal.nullish_coalescing=enable module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' -module.name_mapper='types' -> '/types/index.js' +module.name_mapper='^types' -> '/types/index.js' suppress_type=$FlowIssue suppress_type=$FlowFixMe diff --git a/packages/cli/src/commands/doctor/checkInstallation.js b/packages/cli/src/commands/doctor/checkInstallation.js index 1a42a7f79..6a9647f96 100644 --- a/packages/cli/src/commands/doctor/checkInstallation.js +++ b/packages/cli/src/commands/doctor/checkInstallation.js @@ -1,3 +1,4 @@ +// @flow import semver from 'semver'; import commandExists from 'command-exists'; @@ -6,7 +7,7 @@ const PACKAGE_MANAGERS = { NPM: 'NPM', }; -const isSoftwareInstalled = async command => { +const isSoftwareInstalled = async (command: string) => { try { await commandExists(command); @@ -16,7 +17,13 @@ const isSoftwareInstalled = async command => { } }; -const doesSoftwareNeedToBeFixed = ({version, versionRange}) => +const doesSoftwareNeedToBeFixed = ({ + version, + versionRange, +}: { + version: string, + versionRange: string, +}) => version === 'Not Found' || !semver.satisfies(semver.coerce(version), versionRange); diff --git a/packages/cli/src/commands/doctor/doctor.js b/packages/cli/src/commands/doctor/doctor.js index 3cf14324e..474bd6e43 100644 --- a/packages/cli/src/commands/doctor/doctor.js +++ b/packages/cli/src/commands/doctor/doctor.js @@ -1,3 +1,4 @@ +// @flow import chalk from 'chalk'; import envinfo from 'envinfo'; import {logger} from '@react-native-community/cli-tools'; @@ -5,6 +6,8 @@ import {getHealthchecks, HEALTHCHECK_TYPES} from './healthchecks'; import {getLoader} from '../../tools/loader'; import printFixOptions, {KEYS} from './printFixOptions'; import runAutomaticFix, {AUTOMATIC_FIX_LEVELS} from './runAutomaticFix'; +import type {ConfigT} from 'types'; +import type {HealthCheckInterface} from './types'; const printCategory = ({label, key}) => { if (key > 0) { @@ -14,7 +17,15 @@ const printCategory = ({label, key}) => { logger.log(chalk.dim(label)); }; -const printIssue = ({label, needsToBeFixed, isRequired}) => { +const printIssue = ({ + label, + needsToBeFixed, + isRequired, +}: { + label: string, + needsToBeFixed: boolean, + isRequired: boolean, +}) => { const symbol = needsToBeFixed ? isRequired ? chalk.red('✖') @@ -29,7 +40,16 @@ const printOverallStats = ({errors, warnings}) => { logger.log(`${chalk.bold('Warnings:')} ${warnings}`); }; -export default (async function runDoctor(argv, ctx, options) { +type FlagsT = { + fix: boolean | void, + contributor: boolean | void, +}; + +export default (async function runDoctor( + argv: Array, + ctx: ConfigT, + options: FlagsT, +) { const Loader = getLoader(); const loader = new Loader(); @@ -48,7 +68,13 @@ export default (async function runDoctor(argv, ctx, options) { ), ); - const iterateOverHealthChecks = async ({label, healthchecks}) => ({ + const iterateOverHealthChecks = async ({ + label, + healthchecks, + }: { + label: string, + healthchecks: Array, + }) => ({ label, healthchecks: (await Promise.all( healthchecks.map(async healthcheck => { @@ -56,9 +82,9 @@ export default (async function runDoctor(argv, ctx, options) { return; } - const {needsToBeFixed} = healthcheck.getDiagnostics - ? healthcheck.getDiagnostics(environmentInfo) - : await healthcheck.getDiagnosticsAsync(environmentInfo); + const {needsToBeFixed} = await healthcheck.getDiagnostics( + environmentInfo, + ); // Assume that it's required unless specified otherwise const isRequired = healthcheck.isRequired !== false; @@ -66,7 +92,7 @@ export default (async function runDoctor(argv, ctx, options) { return { label: healthcheck.label, - needsToBeFixed, + needsToBeFixed: Boolean(needsToBeFixed), runAutomaticFix: healthcheck.runAutomaticFix, isRequired, type: needsToBeFixed @@ -87,6 +113,7 @@ export default (async function runDoctor(argv, ctx, options) { ); const iterateOverCategories = categories => + // $FlowFixMe - bad Object.values typings Promise.all(categories.map(iterateOverHealthChecks)); const healthchecksPerCategory = await iterateOverCategories( @@ -129,6 +156,7 @@ export default (async function runDoctor(argv, ctx, options) { } const onKeyPress = async key => { + // $FlowFixMe process.stdin.setRawMode(false); process.stdin.removeAllListeners('data'); diff --git a/packages/cli/src/commands/doctor/healthchecks/androidHomeEnvVariable.js b/packages/cli/src/commands/doctor/healthchecks/androidHomeEnvVariable.js index 92902223e..410b9855d 100644 --- a/packages/cli/src/commands/doctor/healthchecks/androidHomeEnvVariable.js +++ b/packages/cli/src/commands/doctor/healthchecks/androidHomeEnvVariable.js @@ -1,5 +1,8 @@ +// @flow import chalk from 'chalk'; +import Ora from 'ora'; import {logManualInstallation} from './common'; +import type {HealthCheckInterface} from '../types'; // List of answers on how to set `ANDROID_HOME` for each platform const URLS = { @@ -10,12 +13,12 @@ const URLS = { const label = 'ANDROID_HOME'; -export default { +export default ({ label, - getDiagnostics: () => ({ + getDiagnostics: async () => ({ needsToBeFixed: !process.env.ANDROID_HOME, }), - runAutomaticFix: async ({loader}) => { + runAutomaticFix: async ({loader}: {loader: typeof Ora}) => { loader.info(); logManualInstallation({ @@ -24,4 +27,4 @@ export default { )}.`, }); }, -}; +}: HealthCheckInterface); diff --git a/packages/cli/src/commands/doctor/healthchecks/androidNDK.js b/packages/cli/src/commands/doctor/healthchecks/androidNDK.js index 0f07e58ea..d3481e1fe 100644 --- a/packages/cli/src/commands/doctor/healthchecks/androidNDK.js +++ b/packages/cli/src/commands/doctor/healthchecks/androidNDK.js @@ -1,17 +1,26 @@ +// @flow import chalk from 'chalk'; +import Ora from 'ora'; import {logManualInstallation} from './common'; import versionRanges from '../versionRanges'; import {doesSoftwareNeedToBeFixed} from '../checkInstallation'; +import type {EnvironmentInfo, HealthCheckInterface} from '../types'; -export default { +export default ({ label: 'Android NDK', - getDiagnosticsAsync: async ({SDKs}) => ({ + getDiagnostics: async ({SDKs}: EnvironmentInfo) => ({ needsToBeFixed: doesSoftwareNeedToBeFixed({ version: SDKs['Android SDK']['Android NDK'], versionRange: versionRanges.ANDROID_NDK, }), }), - runAutomaticFix: async ({loader, environmentInfo}) => { + runAutomaticFix: async ({ + loader, + environmentInfo, + }: { + loader: typeof Ora, + environmentInfo: EnvironmentInfo, + }) => { const version = environmentInfo.SDKs['Android SDK']['Android NDK']; const isNDKInstalled = version !== 'Not Found'; @@ -30,4 +39,4 @@ export default { url: 'https://developer.android.com/ndk/downloads', }); }, -}; +}: HealthCheckInterface); diff --git a/packages/cli/src/commands/doctor/healthchecks/androidSDK.js b/packages/cli/src/commands/doctor/healthchecks/androidSDK.js index 7707a9d87..c82e0eaf5 100644 --- a/packages/cli/src/commands/doctor/healthchecks/androidSDK.js +++ b/packages/cli/src/commands/doctor/healthchecks/androidSDK.js @@ -1,16 +1,19 @@ +// @flow import chalk from 'chalk'; +import Ora from 'ora'; import {logManualInstallation} from './common'; import versionRanges from '../versionRanges'; import {doesSoftwareNeedToBeFixed} from '../checkInstallation'; import execa from 'execa'; +import type {EnvironmentInfo, HealthCheckInterface} from '../types'; const installMessage = `Read more about how to update Android SDK at ${chalk.dim( 'https://developer.android.com/studio', )}`; -export default { +export default ({ label: 'Android SDK', - getDiagnosticsAsync: async ({SDKs}) => { + getDiagnostics: async ({SDKs}: EnvironmentInfo) => { let sdks = SDKs['Android SDK']; // This is a workaround for envinfo's Android SDK check not working on @@ -18,6 +21,7 @@ export default { // See the PR: https://github.com/tabrindle/envinfo/pull/119 if (sdks === 'Not Found' && process.platform !== 'darwin') { try { + // $FlowFixMe bad execa types const {stdout} = await execa( process.env.ANDROID_HOME ? `${process.env.ANDROID_HOME}/tools/bin/sdkmanager` @@ -29,7 +33,9 @@ export default { const regex = /build-tools;([\d|.]+)[\S\s]/g; let match = null; while ((match = regex.exec(stdout)) !== null) { - matches.push(match[1]); + if (match) { + matches.push(match[1]); + } } if (matches.length > 0) { sdks = { @@ -42,13 +48,20 @@ export default { return { needsToBeFixed: (sdks === 'Not Found' && installMessage) || - doesSoftwareNeedToBeFixed({ - version: sdks['Build Tools'][0], - versionRange: versionRanges.ANDROID_NDK, - }), + (sdks !== 'Not Found' && + doesSoftwareNeedToBeFixed({ + version: sdks['Build Tools'][0], + versionRange: versionRanges.ANDROID_NDK, + })), }; }, - runAutomaticFix: async ({loader, environmentInfo}) => { + runAutomaticFix: async ({ + loader, + environmentInfo, + }: { + loader: typeof Ora, + environmentInfo: EnvironmentInfo, + }) => { const version = environmentInfo.SDKs['Android SDK'][0]; const isNDKInstalled = version !== 'Not Found'; @@ -65,4 +78,4 @@ export default { url: 'https://facebook.github.io/react-native/docs/getting-started', }); }, -}; +}: HealthCheckInterface); diff --git a/packages/cli/src/commands/doctor/healthchecks/cocoaPods.js b/packages/cli/src/commands/doctor/healthchecks/cocoaPods.js index dd8597b99..5644278c6 100644 --- a/packages/cli/src/commands/doctor/healthchecks/cocoaPods.js +++ b/packages/cli/src/commands/doctor/healthchecks/cocoaPods.js @@ -1,10 +1,12 @@ +// @flow import {isSoftwareInstalled} from '../checkInstallation'; import {installCocoaPods} from '../../../tools/installPods'; +import {type HealthCheckInterface} from '../types'; -export default { +export default ({ label: 'CocoaPods', - getDiagnosticsAsync: async () => ({ + getDiagnostics: async () => ({ needsToBeFixed: !(await isSoftwareInstalled('pod')), }), runAutomaticFix: async ({loader}) => await installCocoaPods(loader), -}; +}: HealthCheckInterface); diff --git a/packages/cli/src/commands/doctor/healthchecks/common.js b/packages/cli/src/commands/doctor/healthchecks/common.js index cc48db2c5..1bce843c3 100644 --- a/packages/cli/src/commands/doctor/healthchecks/common.js +++ b/packages/cli/src/commands/doctor/healthchecks/common.js @@ -1,10 +1,21 @@ +// @flow import logger from '@react-native-community/cli-tools/build/logger'; import chalk from 'chalk'; // Space is necessary to keep correct ordering on screen const logMessage = message => logger.log(` ${message}`); -const logManualInstallation = ({healthcheck, url, command, message}) => { +const logManualInstallation = ({ + healthcheck = '', + url, + command, + message, +}: { + healthcheck?: string, + url?: string, + command?: string, + message?: string, +}) => { if (message) { return logMessage(message); } diff --git a/packages/cli/src/commands/doctor/healthchecks/index.js b/packages/cli/src/commands/doctor/healthchecks/index.js index 19d49a93f..c95ddf644 100644 --- a/packages/cli/src/commands/doctor/healthchecks/index.js +++ b/packages/cli/src/commands/doctor/healthchecks/index.js @@ -1,3 +1,4 @@ +// @flow import nodeJS from './nodeJS'; import {yarn, npm} from './packageManagers'; import watchman from './watchman'; @@ -13,7 +14,12 @@ export const HEALTHCHECK_TYPES = { WARNING: 'WARNING', }; -export const getHealthchecks = ({contributor}) => ({ +type Options = { + fix: boolean | void, + contributor: boolean | void, +}; + +export const getHealthchecks = ({contributor}: Options) => ({ common: { label: 'Common', healthchecks: [ @@ -25,7 +31,6 @@ export const getHealthchecks = ({contributor}) => ({ }, android: { label: 'Android', - // TODO: Android NDK should be shown only with a special flag healthchecks: [ androidHomeEnvVariable, androidSDK, diff --git a/packages/cli/src/commands/doctor/healthchecks/iosDeploy.js b/packages/cli/src/commands/doctor/healthchecks/iosDeploy.js index 37bec8bb4..b4a8e9aed 100644 --- a/packages/cli/src/commands/doctor/healthchecks/iosDeploy.js +++ b/packages/cli/src/commands/doctor/healthchecks/iosDeploy.js @@ -1,7 +1,10 @@ +// @flow import execa from 'execa'; +import Ora from 'ora'; import {isSoftwareInstalled, PACKAGE_MANAGERS} from '../checkInstallation'; import {packageManager} from './packageManagers'; import {logManualInstallation} from './common'; +import type {HealthCheckInterface} from '../types'; const getInstallationCommand = () => { if (packageManager === PACKAGE_MANAGERS.YARN) { @@ -15,13 +18,13 @@ const getInstallationCommand = () => { return undefined; }; -export default { +export default ({ label: 'ios-deploy', isRequired: false, - getDiagnosticsAsync: async () => ({ + getDiagnostics: async () => ({ needsToBeFixed: !(await isSoftwareInstalled('ios-deploy')), }), - runAutomaticFix: async ({loader}) => { + runAutomaticFix: async ({loader}: {loader: typeof Ora}) => { const installationCommand = getInstallationCommand(); // This means that we couldn't "guess" the package manager @@ -33,6 +36,7 @@ export default { healthcheck: 'ios-deploy', url: 'https://github.com/ios-control/ios-deploy#readme', }); + return; } try { @@ -51,4 +55,4 @@ export default { }); } }, -}; +}: HealthCheckInterface); diff --git a/packages/cli/src/commands/doctor/healthchecks/nodeJS.js b/packages/cli/src/commands/doctor/healthchecks/nodeJS.js index bae6bc910..a4dfdd8eb 100644 --- a/packages/cli/src/commands/doctor/healthchecks/nodeJS.js +++ b/packages/cli/src/commands/doctor/healthchecks/nodeJS.js @@ -1,17 +1,20 @@ +// @flow +import Ora from 'ora'; import versionRanges from '../versionRanges'; import {doesSoftwareNeedToBeFixed} from '../checkInstallation'; import {logManualInstallation} from './common'; +import type {EnvironmentInfo, HealthCheckInterface} from '../types'; -export default { +export default ({ label: 'Node.js', - getDiagnostics: ({Binaries}) => ({ + getDiagnostics: async ({Binaries}: EnvironmentInfo) => ({ version: Binaries.Node.version, needsToBeFixed: doesSoftwareNeedToBeFixed({ version: Binaries.Node.version, versionRange: versionRanges.NODE_JS, }), }), - runAutomaticFix: async ({loader}) => { + runAutomaticFix: async ({loader}: {loader: typeof Ora}) => { loader.fail(); logManualInstallation({ @@ -19,4 +22,4 @@ export default { url: 'https://nodejs.org/en/download/', }); }, -}; +}: HealthCheckInterface); diff --git a/packages/cli/src/commands/doctor/healthchecks/packageManagers.js b/packages/cli/src/commands/doctor/healthchecks/packageManagers.js index d14a917b3..92433c7ad 100644 --- a/packages/cli/src/commands/doctor/healthchecks/packageManagers.js +++ b/packages/cli/src/commands/doctor/healthchecks/packageManagers.js @@ -1,10 +1,13 @@ +// @flow import fs from 'fs'; +import Ora from 'ora'; import versionRanges from '../versionRanges'; import { PACKAGE_MANAGERS, doesSoftwareNeedToBeFixed, } from '../checkInstallation'; import {install} from '../../../tools/install'; +import type {EnvironmentInfo, HealthCheckInterface} from '../types'; const packageManager = (() => { if (fs.existsSync('yarn.lock')) { @@ -18,9 +21,9 @@ const packageManager = (() => { return undefined; })(); -const yarn = { +const yarn: HealthCheckInterface = { label: 'yarn', - getDiagnostics: ({Binaries}) => ({ + getDiagnostics: async ({Binaries}: EnvironmentInfo) => ({ version: Binaries.Node.version, needsToBeFixed: doesSoftwareNeedToBeFixed({ version: Binaries.Yarn.version, @@ -31,13 +34,13 @@ const yarn = { // or if we can't identify that the user uses yarn or npm visible: packageManager === PACKAGE_MANAGERS.YARN || packageManager === undefined, - runAutomaticFix: async ({loader}) => + runAutomaticFix: async ({loader}: typeof Ora) => await install('yarn', 'https://yarnpkg.com/docs/install', loader), }; -const npm = { +const npm: HealthCheckInterface = { label: 'npm', - getDiagnostics: ({Binaries}) => ({ + getDiagnostics: async ({Binaries}: EnvironmentInfo) => ({ needsToBeFixed: doesSoftwareNeedToBeFixed({ version: Binaries.npm.version, versionRange: versionRanges.NPM, @@ -47,7 +50,7 @@ const npm = { // or if we can't identify that the user uses yarn or npm visible: packageManager === PACKAGE_MANAGERS.NPM || packageManager === undefined, - runAutomaticFix: async ({loader}) => + runAutomaticFix: async ({loader}: typeof Ora) => await install('node', 'https://nodejs.org/', loader), }; diff --git a/packages/cli/src/commands/doctor/healthchecks/watchman.js b/packages/cli/src/commands/doctor/healthchecks/watchman.js index e32967b99..798708a78 100644 --- a/packages/cli/src/commands/doctor/healthchecks/watchman.js +++ b/packages/cli/src/commands/doctor/healthchecks/watchman.js @@ -1,16 +1,19 @@ +// @flow +import Ora from 'ora'; import versionRanges from '../versionRanges'; import {doesSoftwareNeedToBeFixed} from '../checkInstallation'; import {install} from '../../../tools/install'; +import type {EnvironmentInfo} from '../types'; export default { label: 'Watchman', - getDiagnostics: ({Binaries}) => ({ + getDiagnostics: ({Binaries}: EnvironmentInfo) => ({ needsToBeFixed: doesSoftwareNeedToBeFixed({ version: Binaries.Watchman.version, versionRange: versionRanges.WATCHMAN, }), }), - runAutomaticFix: async ({loader}) => + runAutomaticFix: async ({loader}: typeof Ora) => await install( 'watchman', 'https://facebook.github.io/watchman/docs/install.html', diff --git a/packages/cli/src/commands/doctor/healthchecks/xcode.js b/packages/cli/src/commands/doctor/healthchecks/xcode.js index c16900886..74ac04a7c 100644 --- a/packages/cli/src/commands/doctor/healthchecks/xcode.js +++ b/packages/cli/src/commands/doctor/healthchecks/xcode.js @@ -1,16 +1,19 @@ +// @flow +import Ora from 'ora'; import versionRanges from '../versionRanges'; import {doesSoftwareNeedToBeFixed} from '../checkInstallation'; import {logManualInstallation} from './common'; +import type {EnvironmentInfo, HealthCheckInterface} from '../types'; -export default { +export default ({ label: 'Xcode', - getDiagnostics: ({IDEs}) => ({ + getDiagnostics: async ({IDEs}: EnvironmentInfo) => ({ needsToBeFixed: doesSoftwareNeedToBeFixed({ version: IDEs.Xcode.version.split('/')[0], versionRange: versionRanges.XCODE, }), }), - runAutomaticFix: ({loader}) => { + runAutomaticFix: async ({loader}: {loader: typeof Ora}) => { loader.info(); logManualInstallation({ @@ -18,4 +21,4 @@ export default { url: 'https://developer.apple.com/xcode/', }); }, -}; +}: HealthCheckInterface); diff --git a/packages/cli/src/commands/doctor/printFixOptions.js b/packages/cli/src/commands/doctor/printFixOptions.js index ecd589d7b..9134f8c0f 100644 --- a/packages/cli/src/commands/doctor/printFixOptions.js +++ b/packages/cli/src/commands/doctor/printFixOptions.js @@ -1,5 +1,7 @@ +// @flow import chalk from 'chalk'; import {logger} from '@react-native-community/cli-tools'; + const KEYS = { FIX_ALL_ISSUES: 'f', FIX_ERRORS: 'e', @@ -28,9 +30,10 @@ const printOptions = () => { }; export {KEYS}; -export default ({onKeyPress}) => { +export default ({onKeyPress}: {onKeyPress: any}) => { printOptions(); + // $FlowFixMe process.stdin.setRawMode(true); process.stdin.resume(); process.stdin.setEncoding('utf8'); diff --git a/packages/cli/src/commands/doctor/runAutomaticFix.js b/packages/cli/src/commands/doctor/runAutomaticFix.js index e16731ae2..f954dd9b7 100644 --- a/packages/cli/src/commands/doctor/runAutomaticFix.js +++ b/packages/cli/src/commands/doctor/runAutomaticFix.js @@ -1,7 +1,9 @@ +// @flow import chalk from 'chalk'; import ora from 'ora'; import logger from '../../tools/logger'; import {HEALTHCHECK_TYPES} from './healthchecks'; +import type {EnvironmentInfo} from './types'; const AUTOMATIC_FIX_LEVELS = { ALL_ISSUES: 'ALL_ISSUES', @@ -16,9 +18,17 @@ export default async ({ stats, loader, environmentInfo, +}: { + healthchecks: any, + automaticFixLevel: $Values, + stats: {errors: any, warnings: any}, + loader: typeof ora, + environmentInfo: EnvironmentInfo, }) => { // Remove the fix options from screen + // $FlowFixMe process.stdout.moveCursor(0, -6); + // $FlowFixMe process.stdout.clearScreenDown(); const totalIssuesBasedOnFixLevel = { diff --git a/packages/cli/src/commands/doctor/types.js b/packages/cli/src/commands/doctor/types.js new file mode 100644 index 000000000..3793e8d9b --- /dev/null +++ b/packages/cli/src/commands/doctor/types.js @@ -0,0 +1,79 @@ +// @flow +import Ora from 'ora'; + +export type EnvironmentInfo = { + System: { + OS: string, + CPU: string, + Memory: string, + Shell: { + version: string, + path: string, + }, + }, + Binaries: { + Node: { + version: string, + path: string, + }, + Yarn: { + version: string, + path: string, + }, + npm: { + version: string, + path: string, + }, + Watchman: { + version: string, + path: string, + }, + }, + SDKs: { + 'iOS SDK': { + Platforms: string[], + }, + 'Android SDK': { + 'API Levels': string[], + 'Build Tools': string[], + 'System Images': string[], + 'Android NDK': string, + }, + }, + IDEs: { + 'Android Studio': string, + Emacs: { + version: string, + path: string, + }, + Nano: { + version: string, + path: string, + }, + VSCode: { + version: string, + path: string, + }, + Vim: { + version: string, + path: string, + }, + Xcode: { + version: string, + path: string, + }, + }, +}; + +export type HealthCheckInterface = { + label: string, + visible?: boolean | void, + isRequired?: boolean, + getDiagnostics: ( + environmentInfo: EnvironmentInfo, + ) => Promise<{version?: string, needsToBeFixed: boolean | string}>, + runAutomaticFix: (args: { + loader: typeof Ora, + environmentInfo: EnvironmentInfo, + }) => Promise | void, +}; diff --git a/packages/cli/src/commands/doctor/versionRanges.js b/packages/cli/src/commands/doctor/versionRanges.js index d67496bd6..d1909f150 100644 --- a/packages/cli/src/commands/doctor/versionRanges.js +++ b/packages/cli/src/commands/doctor/versionRanges.js @@ -1,3 +1,4 @@ +// @flow export default { // Common NODE_JS: '>= 8.3', diff --git a/packages/cli/src/tools/installPods.js b/packages/cli/src/tools/installPods.js index b8f8853fe..6ce743dac 100644 --- a/packages/cli/src/tools/installPods.js +++ b/packages/cli/src/tools/installPods.js @@ -121,7 +121,7 @@ async function installPods({ await execa('pod', ['--version']); } catch (e) { loader.info(); - installCocoaPods(loader); + await installCocoaPods(loader); } if (shouldUpdatePods) {