diff --git a/index.js b/index.js index 3976aa0..70d80df 100644 --- a/index.js +++ b/index.js @@ -10,15 +10,15 @@ var fs = require('fs'); function Chalk(options) { // detect mode if not set manually this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; - var configPath = process.cwd() + '/.chalkrc'; - if (fs.existsSync(configPath)) { - var content = JSON.parse(fs.readFileSync(configPath)); - if (content.overwrite) { - Object.keys(content.overwrite).forEach(function (key) { - ansiStyles[key] = ansiStyles[content.overwrite[key]]; - }); - } - } + var configPath = process.cwd() + '/.chalkrc'; + if (fs.existsSync(configPath)) { + var content = JSON.parse(fs.readFileSync(configPath)); + if (content.overwrite) { + Object.keys(content.overwrite).forEach(function (key) { + ansiStyles[key] = ansiStyles[content.overwrite[key]]; + }); + } + } } // use bright blue on Windows as the normal blue color is illegible