Have parseCommandLine use a new instance of optimist for each run

Reviewed By: mjmahone

Differential Revision: D3156730

fb-gh-sync-id: 0a55d0c231a93a6c590bd8c4a6eb793eda66f32f
fbshipit-source-id: 0a55d0c231a93a6c590bd8c4a6eb793eda66f32f
This commit is contained in:
Sam Swarr 2016-04-08 12:08:15 -07:00 committed by Facebook Github Bot 6
parent 648aaf440b
commit 66d5529ea4
1 changed files with 2 additions and 1 deletions

View File

@ -18,9 +18,10 @@
*/ */
'use strict'; 'use strict';
var optimist = require('optimist'); var optimistModule = require('optimist');
function parseCommandLine(config, args) { function parseCommandLine(config, args) {
var optimist = new optimistModule();
args = args || process.argv; args = args || process.argv;
// optimist default API requires you to write the command name three time // optimist default API requires you to write the command name three time
// This is a small wrapper to accept an object instead // This is a small wrapper to accept an object instead