mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
config file error handling
This commit is contained in:
parent
e01d30adb9
commit
11bf03f130
1 changed files with 6 additions and 1 deletions
|
@ -19,7 +19,12 @@ function Config(config) {
|
||||||
if (!(this instanceof Config)) return new Config(config);
|
if (!(this instanceof Config)) return new Config(config);
|
||||||
for (var i in config) {
|
for (var i in config) {
|
||||||
if (this[i] == null) this[i] = config[i];
|
if (this[i] == null) this[i] = config[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// some weird shell scripts are valid yaml files parsed as string
|
||||||
|
assert.equal(typeof(config), 'object', 'CONFIG: this doesn\'t look like a valid config file');
|
||||||
|
|
||||||
|
assert(this.storage, 'CONFIG: storage path not defined');
|
||||||
|
|
||||||
var users = {all:true};
|
var users = {all:true};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue