1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-21 07:29:37 +01:00

fix: allow do not include storage if uses a storage plugin

This commit is contained in:
Juan Picado @jotadeveloper 2018-05-05 15:35:42 +02:00
parent edd211ec67
commit 4332ffc7a7
No known key found for this signature in database
GPG Key ID: 18AC54485952D158
2 changed files with 2 additions and 3 deletions

@ -91,9 +91,7 @@ class Config {
// some weird shell scripts are valid yaml files parsed as string
assert.equal(typeof(config), 'object', 'CONFIG: it doesn\'t look like a valid config file');
assert(self.storage, 'CONFIG: storage path not defined');
// sanity check for strategic config properties
// sanity check for strategic config properties
strategicConfigProps.forEach(function(x) {
if (self[x] == null) self[x] = {};
assert(Utils.isObject(self[x]), `CONFIG: bad "${x}" value (object expected)`);

@ -842,6 +842,7 @@ class LocalStorage implements IStorage {
const Storage = this._loadStorePlugin();
if (_.isNil(Storage)) {
assert(this.config.storage, 'CONFIG: storage path not defined');
return new LocalDatabase(this.config, logger);
} else {
return Storage;