From cf6ceb431e325452b76e0293da0a612f646aa440 Mon Sep 17 00:00:00 2001 From: Philipp von Weitershausen Date: Tue, 26 May 2015 12:37:00 -0700 Subject: [PATCH] Fix packager.sh arg parsing All option arguments get parsed as booleans. This fixes that and makes it possible again to run the packager with arguments, e.g.: react-native/packager/packager.sh --root . (This is a follow-up to D2089601 / b46c94.) --- packager/packager.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packager/packager.js b/packager/packager.js index eb90b04e080638..ec3b4a6a9bf063 100644 --- a/packager/packager.js +++ b/packager/packager.js @@ -36,19 +36,24 @@ var webSocketProxy = require('./webSocketProxy.js'); var options = parseCommandLine([{ command: 'port', default: 8081, + type: 'string', }, { command: 'root', description: 'add another root(s) to be used by the packager in this project', + type: 'string', }, { command: 'assetRoots', - description: 'specify the root directories of app assets' + description: 'specify the root directories of app assets', + type: 'string', }, { command: 'platform', default: 'ios', - description: 'Specify the platform-specific blacklist (ios, android, web).' + description: 'Specify the platform-specific blacklist (ios, android, web).', + type: 'string', }, { command: 'skipflow', - description: 'Disable flow checks' + description: 'Disable flow checks', + type: 'boolean', }]); if (options.projectRoots) {