fix: add debug logs for config file path

This commit is contained in:
Pierre Vanduynslager 2018-11-02 14:50:58 -04:00
parent 6d0bd8c9b1
commit 3c8177aed8

View File

@ -20,7 +20,10 @@ const CONFIG_FILES = [
module.exports = async (context, opts) => { module.exports = async (context, opts) => {
const {cwd, env} = context; const {cwd, env} = context;
const {config} = (await cosmiconfig(CONFIG_NAME, {searchPlaces: CONFIG_FILES}).search(cwd)) || {}; const {config, filepath} = (await cosmiconfig(CONFIG_NAME, {searchPlaces: CONFIG_FILES}).search(cwd)) || {};
debug('load config from: %s', filepath);
// Merge config file options and CLI/API options // Merge config file options and CLI/API options
let options = {...config, ...opts}; let options = {...config, ...opts};
const pluginsPath = {}; const pluginsPath = {};