config: fix arg aliasing.

This commit is contained in:
Christopher Jeffrey 2016-07-30 13:53:43 -07:00
parent 0343140f0a
commit ec41bf2be5
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
3 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,8 @@
'use strict';
process.title = 'bcoin';
var bcoin = require('../');
var utils = bcoin.utils;
var assert = utils.assert;

View File

@ -2,6 +2,8 @@
'use strict';
process.title = 'bcoin';
var bcoin = require('../');
var utils = bcoin.utils;
var assert = utils.assert;

View File

@ -268,6 +268,9 @@ config.parseArg = function parseArg(argv) {
value = 'true';
}
key = key.replace(/\-/g, '');
alias = config.alias.arg[key];
if (alias)
key = alias;
data[key] = value;
continue;
}