From 51d983bfa44d0047db5e46bf72b5cba818d43cd8 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Tue, 27 Nov 2018 23:31:39 -0800 Subject: [PATCH] flow-typed: Define minimist Summary: Fixes a minor Flow type error when `minimist` is typed via `flow-typed`. Reviewed By: TheSavior Differential Revision: D13188680 fbshipit-source-id: 9ad35a3222c8937163a998a2751efd95945af3c7 --- local-cli/core/index.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/local-cli/core/index.js b/local-cli/core/index.js index 438dadd55..0d2a44162 100644 --- a/local-cli/core/index.js +++ b/local-cli/core/index.js @@ -18,13 +18,7 @@ const ios = require('./ios'); const wrapCommands = require('./wrapCommands'); const {ASSET_REGISTRY_PATH} = require('./Constants'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const flatten = require('lodash').flatten; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const minimist = require('minimist'); const path = require('path'); @@ -128,7 +122,9 @@ const defaultRNConfig = { async function getCliConfig(): Promise { const cliArgs = minimist(process.argv.slice(2)); const config = await Config.load( - cliArgs.config != null ? path.resolve(__dirname, cliArgs.config) : null, + typeof cliArgs.config === 'string' + ? path.resolve(__dirname, cliArgs.config) + : null, ); // $FlowFixMe Metro configuration is immutable.