diff --git a/go/private/sdk.bzl b/go/private/sdk.bzl index 08c6e74c00..5c9b3efc0a 100644 --- a/go/private/sdk.bzl +++ b/go/private/sdk.bzl @@ -463,8 +463,10 @@ def _remote_sdk(ctx, urls, strip_prefix, sha256): ) def _local_sdk(ctx, path): - for entry in ["src", "pkg", "bin", "lib", "misc"]: - ctx.symlink(path + "/" + entry, entry) + for entry in ctx.path(path).readdir(): + if ctx.path(entry.basename).exists: + continue + ctx.symlink(entry, entry.basename) def _sdk_build_file(ctx, platform, version, experiments): ctx.file("ROOT")