Skip to content

Report actual attempted Git command when Git.refresh fails #1812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 26, 2024
Prev Previous commit
Next Next commit
Fix wrong GitCommandNotFound command from refresh
See #1809. The test extended in the previous commit now passes.
  • Loading branch information
EliahKagan committed Jan 24, 2024
commit 24d6067d9f2a3666d5812e98d6f6bb2bc7cce27f
2 changes: 1 addition & 1 deletion git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def refresh(cls, path: Union[None, PathLike] = None) -> bool:
else:
# After the first refresh (when GIT_PYTHON_GIT_EXECUTABLE is no longer
# None) we raise an exception.
raise GitCommandNotFound("git", err)
raise GitCommandNotFound(new_git, err)

return has_git

Expand Down