Skip to content

Commit

Permalink
DBG:print process
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-kokos committed Mar 24, 2023
1 parent 7bf3ab1 commit 6bd32aa
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/poetry/vcs/git/system.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import logging
import os
import subprocess

Expand All @@ -13,6 +14,9 @@
from typing import Any


logger = logging.getLogger(__name__)


class SystemGit:
@classmethod
def clone(cls, repository: str, dest: Path) -> str:
Expand Down Expand Up @@ -52,15 +56,16 @@ def run(*args: Any, **kwargs: Any) -> str:
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,
env=env,
)
.decode()
.strip()
proc = subprocess.run(
git_command + list(args),
stderr=subprocess.STDOUT,
env=env,
check=False,
)
if proc.stdout:
logger.debug(proc.stdout.decode())
return proc.stdout.decode().strip()
return ""

@staticmethod
def _check_parameter(parameter: str) -> None:
Expand Down

0 comments on commit 6bd32aa

Please sign in to comment.