Compare commits

..

2 Commits

Author SHA1 Message Date
AJ ONeal 7c5a0a48ba v3.0.1: fix missing dir 2019-05-11 19:28:58 -06:00
AJ ONeal c35d780321 v3.0.1: fix missing dir 2019-05-11 19:24:37 -06:00
1 changed files with 2 additions and 2 deletions

View File

@ -19,13 +19,13 @@ module.exports.create = function (config={}) {
// they don't, we'll use the baked-in db with its defaults. // they don't, we'll use the baked-in db with its defaults.
Sequelize = require('sequelize'); Sequelize = require('sequelize');
if (config.storeDatabaseUrl) { if (config.storeDatabaseUrl) {
sequelize = new Sequelize(config.storeDatabaseUrl, { logging: false }); sequelize = new Sequelize(config.storeDatabaseUrl);
} else { } else {
sequelize = new Promise(function (resolve, reject) { sequelize = new Promise(function (resolve, reject) {
confDir = confDir.replace(/~\//, require('os').homedir() + '/'); confDir = confDir.replace(/~\//, require('os').homedir() + '/');
mkdirp(confDir, function (err) { mkdirp(confDir, function (err) {
if (err) { reject(err); return; } if (err) { reject(err); return; }
resolve(new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3', logging: false })); resolve(new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3' }));
}); });
}); });
} }