Skip to content

Commit

Permalink
fixing packager options parser
Browse files Browse the repository at this point in the history
  • Loading branch information
arboleya committed Nov 9, 2015
1 parent 35ecd9c commit c32b48d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,20 +200,21 @@ function parse_packager_options(){
var options = {};

if(~dashdash) {

var args = process.argv.slice(dashdash+1);

_.each(args, function(arg){

var parts = arg.split('=');
var key = parts[0];
var val = parts[1];
var val = parts[1] || true;

if(~names.indexOf(key))
options[key.slice(2)] = val;
else
log('Option `' + key + '` doens\'t exist, ignoring it');
});
}

return options;
}

0 comments on commit c32b48d

Please sign in to comment.