Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/poetry/core/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,10 @@ def executable() -> str:
if not path:
continue

_path = Path(path.strip())
try:
_path.relative_to(Path.cwd())
except ValueError:
_path = Path(path.strip()).resolve()
# Skip git in the current directory
if _path != Path.cwd().resolve() / "git.exe":
_executable = str(_path)

break
else:
_executable = "git"
Expand Down