Fix broken yml config, closes #159
This commit is contained in:
parent
21ad5bba48
commit
5208298a67
|
@ -25,7 +25,7 @@ module.exports = function init(root) {
|
||||||
railway.orm._schemas = [];
|
railway.orm._schemas = [];
|
||||||
|
|
||||||
var confFile = (root || app.root) + '/config/database';
|
var confFile = (root || app.root) + '/config/database';
|
||||||
var config;
|
var config = {};
|
||||||
|
|
||||||
if (existsSync(confFile + '.json')) {
|
if (existsSync(confFile + '.json')) {
|
||||||
try {
|
try {
|
||||||
|
@ -41,7 +41,6 @@ module.exports = function init(root) {
|
||||||
console.log('Could not parse config/database.yml');
|
console.log('Could not parse config/database.yml');
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
config = {};
|
|
||||||
}
|
}
|
||||||
// when driver name started with point - look for driver in app root (relative path)
|
// when driver name started with point - look for driver in app root (relative path)
|
||||||
if (config.driver && config.driver.match(/^\./)) {
|
if (config.driver && config.driver.match(/^\./)) {
|
||||||
|
|
Loading…
Reference in New Issue