compiler_version: suppress stderr unless command fails
gyp considers a shell variable substitution to have failed if it
generates any output to stderr, even if the exit status was zero.
This causes problems when gomacc automatically starts its proxy,
which helpfully reports "GOMA: Starting compiler proxy" to stderr.
Fixed by dropping stderr unless the underlying process returns
a non-zero exit status.
BUG=chromium-os:28670
TEST=Ran hooks normally and inside CrOS chroot, with and without
$CXX pointing to goma. A $CXX which writes to stderr and then
exits with failure still prints its output before the exception.
Review URL: http://codereview.chromium.org/10288005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135663 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: fad554f49bb42f2b91fbf557ed24767a013c6d83
1 file changed