diff --git a/lib/nconf/stores/system.js b/lib/nconf/stores/system.js index 57fd848..c55c128 100644 --- a/lib/nconf/stores/system.js +++ b/lib/nconf/stores/system.js @@ -7,7 +7,6 @@ */ var util = require('util'), - optimist = require('optimist'), Memory = require('./memory').Memory; // @@ -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) {