From cfdc99c93d48d7c9f067a635a29ea51f1d0776f7 Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Mon, 6 May 2024 13:55:16 +0300 Subject: [PATCH 1/3] fix: e sync, compare pathes with no case (#588) --- src/e-sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/e-sync.js b/src/e-sync.js index 7d8d85df..a2e68652 100644 --- a/src/e-sync.js +++ b/src/e-sync.js @@ -18,7 +18,7 @@ function setRemotes(cwd, repo) { .trim(), ); - if (gitRoot !== cwd) { + if (gitRoot.toLowerCase() !== cwd.toLowerCase()) { fatal(`Expected git root to be ${cwd} but found ${gitRoot}`); } From 76d42800d6a59452434d090d88693952e28db310 Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Tue, 7 May 2024 13:48:17 +0300 Subject: [PATCH 2/3] fix: e sync, compare pathes with no case on Windows (#589) --- src/e-sync.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/e-sync.js b/src/e-sync.js index a2e68652..6eb29c7f 100644 --- a/src/e-sync.js +++ b/src/e-sync.js @@ -18,7 +18,10 @@ function setRemotes(cwd, repo) { .trim(), ); - if (gitRoot.toLowerCase() !== cwd.toLowerCase()) { + const _match = (process.platform === "win32") ? + (gitRoot.toLowerCase() === cwd.toLowerCase()) : + (gitRoot === cwd); + if (!_match) { fatal(`Expected git root to be ${cwd} but found ${gitRoot}`); } From 722bdc00001e37887b7a96f6b3119b8916b00db7 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sat, 25 May 2024 13:25:37 -0700 Subject: [PATCH 3/3] Update e-sync.js --- src/e-sync.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/e-sync.js b/src/e-sync.js index 6eb29c7f..3ec043bb 100644 --- a/src/e-sync.js +++ b/src/e-sync.js @@ -18,10 +18,9 @@ function setRemotes(cwd, repo) { .trim(), ); - const _match = (process.platform === "win32") ? - (gitRoot.toLowerCase() === cwd.toLowerCase()) : - (gitRoot === cwd); - if (!_match) { + // 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}`); }