From 1d871cefe4b7e76a9dc287ada015cc3036d7826d Mon Sep 17 00:00:00 2001 From: "bazel.build machine account" <15028808+bazel-io@users.noreply.github.com> Date: Mon, 4 Mar 2024 19:40:20 +0100 Subject: [PATCH] [7.1.0] StarlarkBaseExternalContext.java: propagate error message when deleting temporary directory failed (#21555) Related: https://github.com/bazelbuild/bazel/issues/20013 Commit https://github.com/bazelbuild/bazel/commit/5b4ba3e9b5a3d2532e96812ed7f1fd87c263a467 PiperOrigin-RevId: 585046630 Change-Id: Ifdf098e7d54c1d5dca85a39afd7694dc828331a4 Co-authored-by: Googler --- .../repository/starlark/StarlarkBaseExternalContext.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java index 263f093549200e..aca498083d16ac 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java @@ -970,7 +970,11 @@ public StructImpl downloadAndExtract( } catch (IOException e) { throw new RepositoryFunctionException( new IOException( - "Couldn't delete temporary directory (" + downloadDirectory.getPathString() + ")", e), + "Couldn't delete temporary directory (" + + downloadDirectory.getPathString() + + "): " + + e.getMessage(), + e), Transience.TRANSIENT); } return downloadResult;