# HG changeset patch # User Marcin Kuzminski # Date 2018-01-15 14:39:52 # Node ID 5473f1d4a0aa37685712222a103f3ef3437f80c6 # Parent 9d03aa86576c372994ab842bc05a51277e7b0f9d git: report errors from stdout if stderr is empty diff --git a/vcsserver/subprocessio.py b/vcsserver/subprocessio.py --- a/vcsserver/subprocessio.py +++ b/vcsserver/subprocessio.py @@ -417,6 +417,10 @@ class SubprocessIOChunker(object): "Subprocess exited due to an error:\n" + err) if _returncode and fail_on_return_code: err = ''.join(bg_err) + if not err: + # maybe get empty stderr, try stdout instead + # in many cases git reports the errors on stdout too + err = ''.join(bg_out) raise EnvironmentError( "Subprocess exited with non 0 ret code:%s: stderr:%s" % ( _returncode, err))