diff --git a/src/poetry/vcs/git/system.py b/src/poetry/vcs/git/system.py index c1520539462..5ed84733387 100644 --- a/src/poetry/vcs/git/system.py +++ b/src/poetry/vcs/git/system.py @@ -1,5 +1,6 @@ from __future__ import annotations +import os import subprocess from typing import TYPE_CHECKING @@ -49,8 +50,14 @@ def run(*args: Any, **kwargs: Any) -> str: ) + args git_command = find_git_command() + env = os.environ.copy() + env["GIT_TERMINAL_PROMPT"] = "0" return ( - subprocess.check_output(git_command + list(args), stderr=subprocess.STDOUT) + subprocess.check_output( + git_command + list(args), + stderr=subprocess.STDOUT, + env=env, + ) .decode() .strip() )