diff options
author | Klaus Aehlig <aehlig@google.com> | 2018-01-23 00:19:46 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-23 00:21:44 -0800 |
commit | b7272ecaab7eada2f1846597dc5bacc82d2c8821 (patch) | |
tree | 69c9816a13c92dfd8526814ff3a5b2bdd8726d52 /tools | |
parent | 40dc4b9372962a2c0de13ff3dbe7735fa0dff07a (diff) |
http_archive: allow using the shipped BUILD file
Bazel may also depend on external repositories that already contain
build files. When using http_archive from @bazel_tools also support
that use case, by supporting simply omitting `build_file` and
`build_file_contents`.
Change-Id: I40a9b85ae0aba850c73104d2e2fe7f7ee814e093
PiperOrigin-RevId: 182893460
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_defs/repo/http.bzl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/build_defs/repo/http.bzl b/tools/build_defs/repo/http.bzl index 5a2e813e21..23fb41ddf2 100644 --- a/tools/build_defs/repo/http.bzl +++ b/tools/build_defs/repo/http.bzl @@ -57,7 +57,7 @@ def _http_archive_impl(ctx): if ctx.attr.build_file: print("ctx.attr.build_file %s" % str(ctx.attr.build_file)) ctx.symlink(ctx.attr.build_file, "BUILD") - else: + elif ctx.attr.build_file_content: ctx.file("BUILD", ctx.attr.build_file_content) |