From 6ca5a4293670440710b085a7ac4a8325afdc2362 Mon Sep 17 00:00:00 2001
From: Ian Forsey <ian.forsey@net-a-porter.com>
Date: Fri, 21 Mar 2014 23:04:27 +0000
Subject: [PATCH] Allow absolute config paths

---
 app.js         | 2 +-
 src/install.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app.js b/app.js
index 1836539edc..d66e81f137 100644
--- a/app.js
+++ b/app.js
@@ -66,7 +66,7 @@ winston.info('');
 var	configFile = __dirname + '/config.json',
 	configExists;
 if (nconf.get('config')) {
-	configFile = path.join(__dirname, nconf.get('config'));
+	configFile = path.resolve(__dirname, nconf.get('config'));
 }
 configExists = fs.existsSync(configFile);
 
diff --git a/src/install.js b/src/install.js
index 94e22f2582..55fe8053bf 100644
--- a/src/install.js
+++ b/src/install.js
@@ -445,7 +445,7 @@ var async = require('async'),
 		save: function (server_conf, callback) {
 			var	serverConfigPath = path.join(__dirname, '../config.json');
 			if (nconf.get('config')) {
-				serverConfigPath = path.join(__dirname, '../', nconf.get('config'));
+				serverConfigPath = path.resolve(__dirname, '../', nconf.get('config'));
 			}
 
 			fs.writeFile(serverConfigPath, JSON.stringify(server_conf, null, 4), function (err) {