diff --git a/lib/nconf/stores/system.js b/lib/nconf/stores/system.js index 3f4cb3b..57fd848 100644 --- a/lib/nconf/stores/system.js +++ b/lib/nconf/stores/system.js @@ -7,6 +7,7 @@ */ var util = require('util'), + optimist = require('optimist'), Memory = require('./memory').Memory; // @@ -79,10 +80,10 @@ System.prototype.loadArgv = function () { argv; if (typeof this.argv === 'object') { - argv = require('optimist').options(this.argv).argv; + argv = optimist(process.argv.slice(2)).options(this.argv).argv; } else if (this.argv) { - argv = require('optimist').argv; + argv = optimist(process.argv.slice(2)).argv; } if (!argv) { @@ -114,4 +115,5 @@ System.prototype.loadEnv = function () { }); return this.store; -}; \ No newline at end of file +}; +