Fix broken yml config, closes #159

This commit is contained in:
Anatoliy Chakkaev 2012-12-15 16:05:32 +04:00
parent 21ad5bba48
commit 5208298a67
1 changed files with 1 additions and 2 deletions

View File

@ -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(/^\./)) {