Skip to content

Commit c4b011e

Browse files
authored
Fix config file search location (#788)
Fix: #787
2 parents 2c49533 + 01de987 commit c4b011e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/sql-formatter-cli.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class SqlFormatterCli {
9999
return this.parseFile(localConfig);
100100
}
101101

102-
findConfig(dir = __dirname) {
102+
findConfig(dir = process.cwd()) {
103103
const filePath = path.join(dir, '.sql-formatter.json');
104104
if (!fs.existsSync(filePath)) {
105105
const parentDir = path.resolve(dir, '..');

0 commit comments

Comments
 (0)