Skip to content

Commit

Permalink
Change: Use subprocess.run instead of check_output
Browse files Browse the repository at this point in the history
  • Loading branch information
y0urself committed Feb 10, 2023
1 parent 613258f commit 3790cb0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pontos/git/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ def exec_git(
try:
cmd_args = ["git"]
cmd_args.extend(args)
output = subprocess.check_output(
cmd_args, cwd=fspath(cwd) if cwd else None
output = subprocess.run(
cmd_args,
cwd=fspath(cwd) if cwd else None,
check=True,
stdout=subprocess.PIPE,
)
return output.decode()
return output.stdout.decode()
except subprocess.CalledProcessError as e:
if ignore_errors:
return ""
Expand Down Expand Up @@ -329,7 +332,7 @@ def commit(
verify: Set to False to skip git hooks
gpg_signing_key: GPG Key ID to use to sign the commit
"""
args = ["commit"]
args = ["commit", "--verbose"]
if verify is False:
args.append("--no-verify")
if gpg_signing_key:
Expand Down

0 comments on commit 3790cb0

Please sign in to comment.