Skip to content

Commit 33388bc

Browse files
jonrohantonyganch
authored andcommitted
Use readFileSync and JSON parse to read config
I symlink my .csscomb.json file to another file that doesn’t have a json extension. which causes node’s require to bork.
1 parent ecfc41e commit 33388bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/csscomb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ CSScomb.getCustomConfig = function getCustomConfig(configPath) {
225225
configPath = configPath || CSScomb.getCustomConfigPath();
226226

227227
try {
228-
config = require(configPath);
228+
config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
229229
} catch (e) {
230230
config = null;
231231
}

0 commit comments

Comments
 (0)