From 91b9cbf445574c09a0a128874adf21fd8d67ac47 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 25 Jul 2024 11:03:56 +0200 Subject: [PATCH] fix: path comparison in e sync Co-authored-by: Andrew Kozlov --- src/e-sync.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/e-sync.js b/src/e-sync.js index 7d8d85df..3ec043bb 100644 --- a/src/e-sync.js +++ b/src/e-sync.js @@ -18,7 +18,9 @@ function setRemotes(cwd, repo) { .trim(), ); - if (gitRoot !== cwd) { + // Check if the directories are the same in a way that handles case-insensitive + // filesystems + if (path.relative(gitRoot, cwd) !== '') { fatal(`Expected git root to be ${cwd} but found ${gitRoot}`); }