From ea21195ff0973c4bba0bda5887bb7c5fa5e7c5c2 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 13 Jun 2018 05:48:18 -0700 Subject: Skylark repos: for failed patch command, also report stdout The patch(1) utility usually gives error messages on stdout. So it is not useful to report only stderr in case a patch failed. Report both. Fixes #5379. Change-Id: Ief198849e29ca989dfdefe2fadf495a0b0949972 PiperOrigin-RevId: 200377306 --- tools/build_defs/repo/utils.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/build_defs/repo/utils.bzl b/tools/build_defs/repo/utils.bzl index 4839b3e73b..e23556cce6 100644 --- a/tools/build_defs/repo/utils.bzl +++ b/tools/build_defs/repo/utils.bzl @@ -76,7 +76,8 @@ def patch(ctx): ) st = ctx.execute([bash_exe, "-c", command]) if st.return_code: - fail("Error applying patch %s:\n%s" % (str(patchfile), st.stderr)) + fail("Error applying patch %s:\n%s%s" % + (str(patchfile), st.stderr, st.stdout)) for cmd in ctx.attr.patch_cmds: st = ctx.execute([bash_exe, "-c", cmd]) if st.return_code: -- cgit v1.2.3