Skip to content

Fix crash when git is not installed in container#676

Open
PaulSchwarz3000 wants to merge 1 commit intoRikorose:mainfrom
PaulSchwarz3000:fix/handle-missing-git-binary
Open

Fix crash when git is not installed in container#676
PaulSchwarz3000 wants to merge 1 commit intoRikorose:mainfrom
PaulSchwarz3000:fix/handle-missing-git-binary

Conversation

@PaulSchwarz3000
Copy link

Catch FileNotFoundError in addition to CalledProcessError in git utility functions. When git binary is missing (e.g., in minimal containers), subprocess.check_output raises FileNotFoundError instead of CalledProcessError, causing the application to crash.

Modified functions:

  • get_git_root()
  • get_commit_hash()
  • get_branch_name()

Catch FileNotFoundError in addition to CalledProcessError in git utility
functions. When git binary is missing (e.g., in minimal containers),
subprocess.check_output raises FileNotFoundError instead of CalledProcessError,
causing the application to crash.

Modified functions:
- get_git_root()
- get_commit_hash()
- get_branch_name()

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant