From 144567803530c199fda56fe4995f42220ea5b9f6 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 10 Nov 2017 20:52:50 +0000 Subject: [PATCH] Fixed channel path to work with Ghost-CLI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Just, DERP 🙈 --- core/server/services/channels/loader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/server/services/channels/loader.js b/core/server/services/channels/loader.js index 4f04668393..407e424389 100644 --- a/core/server/services/channels/loader.js +++ b/core/server/services/channels/loader.js @@ -1,5 +1,6 @@ var debug = require('ghost-ignition').debug('channels:loader'), _ = require('lodash'), + path = require('path'), Channel = require('./Channel'), channels = []; @@ -10,7 +11,7 @@ function loadConfig() { // If you are reading this code, and considering using it, best reach out to us on Slack // Definitely don't be angry at us if the structure of the JSON changes or this goes away. try { - channelConfig = require('../../../../config.channels.json'); + channelConfig = require(path.join(process.cwd(), 'config.channels.json')); } catch (err) { channelConfig = require('./config.channels.json'); }