config: fix parseArg.
This commit is contained in:
parent
4f68d4cde0
commit
a071a58380
@ -704,6 +704,8 @@ Config.prototype.parseConfig = function parseConfig(text) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Config.prototype.parseArg = function parseArg(argv) {
|
Config.prototype.parseArg = function parseArg(argv) {
|
||||||
|
let key;
|
||||||
|
|
||||||
if (!argv || typeof argv !== 'object')
|
if (!argv || typeof argv !== 'object')
|
||||||
argv = process.argv;
|
argv = process.argv;
|
||||||
|
|
||||||
@ -711,7 +713,7 @@ Config.prototype.parseArg = function parseArg(argv) {
|
|||||||
|
|
||||||
for (let i = 2; i < argv.length; i++) {
|
for (let i = 2; i < argv.length; i++) {
|
||||||
let arg = argv[i];
|
let arg = argv[i];
|
||||||
let key, value, alias, equals;
|
let value, alias, equals;
|
||||||
|
|
||||||
assert(typeof arg === 'string');
|
assert(typeof arg === 'string');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user