Skip to content

Commit

Permalink
Avoid hidden interactive ssh prompts at low verbosity levels.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarn committed Aug 17, 2024
1 parent 3175fb0 commit 4a421cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/poetry/vcs/git/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ def _fetch_remote_refs(cls, url: str, local: Repo) -> FetchPackResult:
kwargs["username"] = credentials.username
kwargs["password"] = credentials.password

# at lower verbosity levels interactive prompts from ssh are either hidden completely
# or partly hidden by poetry writing over the last line of output
# if the logging level is DEBUG poetry was likely run with -vvv and an interactive prompt
# will probably be displayed correctly
if not logger.isEnabledFor(logging.DEBUG):
kwargs['ssh_command'] = 'ssh -o BatchMode=yes'

config = local.get_config_stack()
client, path = get_transport_and_path(url, config=config, **kwargs)

Expand Down

0 comments on commit 4a421cd

Please sign in to comment.