Skip to content
This repository was archived by the owner on Aug 16, 2019. It is now read-only.

Commit

Permalink
feat: change new db name to verdaccio (#83)
Browse files Browse the repository at this point in the history
* feat: change new db name to verdaccio

* feat: change new db name to verdaccio
  • Loading branch information
omerdrukman authored and juanpicado committed Aug 25, 2018
1 parent fe52196 commit 143977d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/local-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,16 @@ class LocalDatabase implements IPluginStorage {
* @private
*/
_buildStoragePath(config: Config) {
return Path.join(Path.resolve(Path.dirname(config.self_path || ''), (config: any).storage, '.sinopia-db.json'));
const dbGenPath = function(dbName) {
return Path.join(Path.resolve(Path.dirname(config.self_path || ''), (config: any).storage, dbName));
};

const sinopiadbPath = dbGenPath('.sinopia-db.json');
if (fs.existsSync(sinopiadbPath)) {
return sinopiadbPath;
}

return dbGenPath('.verdaccio-db.json');
}

/**
Expand Down

0 comments on commit 143977d

Please sign in to comment.