Skip to content

Commit

Permalink
Remove SDK testdata files with '!' characters in names
Browse files Browse the repository at this point in the history
This makes old versions of Bazel very unhappy.
  • Loading branch information
Jay Conrod committed Oct 3, 2018
1 parent 7ab8051 commit 09ed29a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/private/sdk.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ def _prepare(ctx):
ctx.file("packages.txt", result.stdout)
ctx.file("ROOT", "")

# Go 1.11.1 contains testdata files with '!' in their filenames which
# older versions of Bazel (0.10.0) don't like. Remove if we downloaded
# the SDK. If this is a local SDK, we're probably out of luck.
sh = ctx.os.environ.get("BAZEL_SH", "/bin/sh")
env_execute(ctx, arguments = [sh, "-c", "[ -d src -a ! -L src ] && rm -f src/cmd/go/testdata/mod/*!*"])

def _remote_sdk(ctx, urls, strip_prefix, sha256):
ctx.download_and_extract(
url = urls,
Expand Down

0 comments on commit 09ed29a

Please sign in to comment.