Skip to content

Commit

Permalink
[fix] Fix option parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Nov 22, 2011
1 parent ef3222e commit 1b258bf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/nconf/stores/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

var util = require('util'),
optimist = require('optimist'),
Memory = require('./memory').Memory;

//
Expand Down Expand Up @@ -78,12 +77,12 @@ System.prototype.loadOverrides = function () {
System.prototype.loadArgv = function () {
var self = this,
argv;

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) {
argv = optimist(process.argv.slice(2)).argv;
argv = require('optimist')(process.argv.slice(2)).argv;
}

if (!argv) {
Expand Down

0 comments on commit 1b258bf

Please sign in to comment.