From 66bde254f895b52f4fd6db2c72ef544c780923e6 Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Wed, 8 May 2024 09:05:23 +0300 Subject: [PATCH] fix: e sync, compare pathes with no case on Windows (#588) --- 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 7d8d85df..6eb29c7f 100644 --- a/src/e-sync.js +++ b/src/e-sync.js @@ -18,7 +18,10 @@ function setRemotes(cwd, repo) { .trim(), ); - if (gitRoot !== cwd) { + const _match = (process.platform === "win32") ? + (gitRoot.toLowerCase() === cwd.toLowerCase()) : + (gitRoot === cwd); + if (!_match) { fatal(`Expected git root to be ${cwd} but found ${gitRoot}`); }