Skip to content

Commit

Permalink
redirect stdout to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
euclio committed Jun 8, 2016
1 parent af51893 commit 8bec6b3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions travis_cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ def run(*args, **kwargs):
env = os.environ.copy()
env.update(kwargs.get('env', {}))

ret = subprocess.call(args, stdout=sys.stdout, stderr=sys.stderr, env=env)
ret = subprocess.call(args,
stdout = sys.stdout,
stderr = subprocess.STDOUT,
env = env)
if ret != 0:
exit(ret)

Expand All @@ -32,7 +35,7 @@ def run_output(*args, **kwargs):

try:
output = subprocess.check_output(args,
stderr=sys.stderr,
stderr = subprocess.STDOUT,
env = env)
except subprocess.CalledProcessError as e:
print(e.output.decode('utf-8'))
Expand Down

0 comments on commit 8bec6b3

Please sign in to comment.