From 01de987e9b9b3920172fbdc3ffbe6b5f8284fb6f Mon Sep 17 00:00:00 2001 From: musjj <72612857+musjj@users.noreply.github.com> Date: Fri, 18 Oct 2024 20:51:24 +0700 Subject: [PATCH] Fix config file search location --- bin/sql-formatter-cli.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sql-formatter-cli.cjs b/bin/sql-formatter-cli.cjs index 7e297b261c..7ef7154acd 100755 --- a/bin/sql-formatter-cli.cjs +++ b/bin/sql-formatter-cli.cjs @@ -99,7 +99,7 @@ class SqlFormatterCli { return this.parseFile(localConfig); } - findConfig(dir = __dirname) { + findConfig(dir = process.cwd()) { const filePath = path.join(dir, '.sql-formatter.json'); if (!fs.existsSync(filePath)) { const parentDir = path.resolve(dir, '..');