Fixed channel path to work with Ghost-CLI

- Just, DERP 🙈
This commit is contained in:
Hannah Wolfe 2017-11-10 20:52:50 +00:00
parent a63ce07050
commit 1445678035
1 changed files with 2 additions and 1 deletions

View File

@ -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');
}