From 5500ec49c841abcd8504adfb6347c32407ac5f85 Mon Sep 17 00:00:00 2001 From: Type-Delta <121682210+Type-Delta@users.noreply.github.com> Date: Fri, 24 Jan 2025 12:10:52 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AB=20update:=20which=5Fwin32=5Fgitbas?= =?UTF-8?q?h()=20to=20handle=20git.exe=20in=20bin=20dir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastanime/cli/utils/utils.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fastanime/cli/utils/utils.py b/fastanime/cli/utils/utils.py index 89aa22b..a23c004 100644 --- a/fastanime/cli/utils/utils.py +++ b/fastanime/cli/utils/utils.py @@ -177,10 +177,13 @@ def which_win32_gitbash(): git_path = shutil.which("git") - if git_path and path.dirname(git_path).endswith("cmd"): - gb_path = path.abspath( - path.join(path.dirname(git_path), "..", "bin", "bash.exe") - ) + if git_path: + if path.dirname(git_path).endswith("cmd"): + gb_path = path.abspath( + path.join(path.dirname(git_path), "..", "bin", "bash.exe") + ) + else: + gb_path = path.join(path.dirname(git_path), "bash.exe") if path.exists(gb_path): return gb_path