diff --git a/src/install.js b/src/install.js index b6d062cbb0..1a456725f2 100644 --- a/src/install.js +++ b/src/install.js @@ -5,6 +5,7 @@ var async = require('async'), url = require('url'), path = require('path'), prompt = require('prompt'), + meta = require('./meta'), winston = require('winston'), nconf = require('nconf'), utils = require('../public/src/utils.js'), @@ -233,8 +234,7 @@ function setupDatabase(server_conf, next) { function setupDefaultConfigs(next) { winston.info('Populating database with default configs, if not already set...'); - var meta = require('./meta'), - defaults = require(path.join(__dirname, '../', 'install/data/defaults.json')); + var defaults = require(path.join(__dirname, '../', 'install/data/defaults.json')); async.each(defaults, function (configObj, next) { meta.configs.setOnEmpty(configObj.field, configObj.value, next); @@ -250,7 +250,6 @@ function setupDefaultConfigs(next) { } function setOnEmpty(key1, key2) { - var meta = require('./meta'); if (install.values[key1] && install.values[key2]) { meta.configs.setOnEmpty(key1, install.values[key1]); meta.configs.setOnEmpty(key2, install.values[key2]); @@ -258,7 +257,6 @@ function setOnEmpty(key1, key2) { } function enableDefaultTheme(next) { - var meta = require('./meta'); winston.info('Enabling default theme: Lavender'); meta.themes.set({