Bazel: Remove output directories before extracting jars for javadoc On MacOS the output directories are persisted, which causes errors when attempting to create them again on subsequent runs. Explicitly remove the directories before (re)creating them. Change-Id: Icccd06ae538f72788196c07006f42c48b9d47174
diff --git a/tools/bzl/javadoc.bzl b/tools/bzl/javadoc.bzl index c9ff05d..c479e2c 100644 --- a/tools/bzl/javadoc.bzl +++ b/tools/bzl/javadoc.bzl
@@ -27,8 +27,10 @@ dir = ctx.outputs.zip.path + ".dir" source = ctx.outputs.zip.path + ".source" cmd = [ + "rm -rf %s" % source, "mkdir %s" % source, " && ".join(["unzip -qud %s %s" % (source, j.path) for j in source_jars]), + "rm -rf %s" % dir, "mkdir %s" % dir, " ".join([ ctx.file._javadoc.path,