Skip to content

Commit

Permalink
Don't capture stderr when running git commands (#179)
Browse files Browse the repository at this point in the history
The output of these commands is sometimes parsed, and output from stderr
can interfere with that parsing.
  • Loading branch information
cottsay authored May 3, 2024
1 parent 78f0990 commit c928730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rosdistro/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def ref_is_hash(ref):
def _run_command(cmd, cwd=None, env=None):
result = {'cmd': ' '.join(cmd), 'cwd': cwd}
try:
proc = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
proc = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, env=env)
output, _ = proc.communicate()
result['output'] = output.rstrip()
result['returncode'] = proc.returncode
Expand Down

0 comments on commit c928730

Please sign in to comment.