mirror of
https://github.com/affaan-m/ECC.git
synced 2026-12-06 23:24:01 +09:00
fix(formatter): honor equivalent Windows home paths
This commit is contained in:
1 parent
69bbf04bc7
commit
e9300358da
2 files changed
+24
-1
No files matched your search
@@ -72,7 +72,7 @@ function findProjectRoot(startDir) {
|
||||
while (dir !== path.dirname(dir)) {
|
||||
// Stop before checking the home directory to avoid treating global
|
||||
// dotfiles (e.g. ~/.prettierrc) as a project root marker.
|
||||
if (dir === homeDir) break;
|
||||
if (path.relative(homeDir, dir) === '') break;
|
||||
if (detectFormatter(dir)) {
|
||||
projectRootCache.set(startDir, dir);
|
||||
return dir;
|
||||
|
||||
Reference in new issue
Block a user