Skip to content

Commit

Permalink
Merge pull request #105 from schalkneethling/fix-config-load-path
Browse files Browse the repository at this point in the history
fix(bin): Fix load path for .bobconfigrc
  • Loading branch information
Schalk Neethling authored Aug 26, 2018
2 parents 5bebf5e + 34613b0 commit a211a2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
const cosmiconfig = require('cosmiconfig');
const path = require('path');

function getConfig() {
let configFile = path.join(__dirname, '../.bobconfigrc');
let cosmiConfig = cosmiconfig('bobconfig', {
cache: false,
format: 'json',
sync: true
});

return cosmiConfig.loadSync('./.bobconfigrc').config;
return cosmiConfig.loadSync(configFile).config;
}

module.exports = getConfig;

0 comments on commit a211a2a

Please sign in to comment.