From d4b694e77d1c718e5bc1c4cc1f8c194975bd62a3 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 3 Jul 2026 18:08:00 +0545 Subject: [PATCH] fix(devgen): handle missing git binary gracefully Ensure the function returns an empty list when git is not found, avoiding crashes. --- devgen/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devgen/utils.py b/devgen/utils.py index bcc9f09..34751a2 100644 --- a/devgen/utils.py +++ b/devgen/utils.py @@ -199,7 +199,7 @@ def get_git_staged_files() -> list[str]: try: output = run_git_command(["git", "diff", "--name-only", "--cached"]) return [f for f in output.splitlines() if f.strip()] - except subprocess.CalledProcessError: + except (subprocess.CalledProcessError, FileNotFoundError): return []