Merge pull request #19 from flatiron/fix-option-reparsing
[fix] Fix option parsing
This commit is contained in:
commit
223ad35ae2
1 changed files with 3 additions and 4 deletions
|
@ -7,7 +7,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var util = require('util'),
|
var util = require('util'),
|
||||||
optimist = require('optimist'),
|
|
||||||
Memory = require('./memory').Memory;
|
Memory = require('./memory').Memory;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -78,12 +77,12 @@ System.prototype.loadOverrides = function () {
|
||||||
System.prototype.loadArgv = function () {
|
System.prototype.loadArgv = function () {
|
||||||
var self = this,
|
var self = this,
|
||||||
argv;
|
argv;
|
||||||
|
|
||||||
if (typeof this.argv === 'object') {
|
if (typeof this.argv === 'object') {
|
||||||
argv = optimist(process.argv.slice(2)).options(this.argv).argv;
|
argv = require('optimist')(process.argv.slice(2)).options(this.argv).argv;
|
||||||
}
|
}
|
||||||
else if (this.argv) {
|
else if (this.argv) {
|
||||||
argv = optimist(process.argv.slice(2)).argv;
|
argv = require('optimist')(process.argv.slice(2)).argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!argv) {
|
if (!argv) {
|
||||||
|
|
Loading…
Reference in a new issue