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:
parent
edd211ec67
commit
4332ffc7a7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user