diff options
author | Ed Baunton <edbaunton@gmail.com> | 2018-07-16 11:14:53 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-16 11:17:17 -0700 |
commit | d0d5533ff045c308b60101541badea1d79c4adc1 (patch) | |
tree | ec98752eafbdff31626f36197c0e2b857f30af9c /tools | |
parent | b887cef0db4ae7f57819e1e26ad69e70522283ad (diff) |
http.bzl: Use allow_single_file for labels
To match the label declarations in git.bzl, use `allow_single_file` for
workspace and build file labels.
Per https://docs.bazel.build/versions/master/skylark/lib/attr.html#label this restricts the labels to specify only a single file.
Closes #5561.
PiperOrigin-RevId: 204773387
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_defs/repo/http.bzl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/build_defs/repo/http.bzl b/tools/build_defs/repo/http.bzl index 2fda0bf76f..a884294d6e 100644 --- a/tools/build_defs/repo/http.bzl +++ b/tools/build_defs/repo/http.bzl @@ -109,13 +109,13 @@ _http_archive_attrs = { "sha256": attr.string(), "strip_prefix": attr.string(), "type": attr.string(), - "build_file": attr.label(), + "build_file": attr.label(allow_single_file = True), "build_file_content": attr.string(), "patches": attr.label_list(default = []), "patch_tool": attr.string(default = "patch"), "patch_args": attr.string_list(default = ["-p0"]), "patch_cmds": attr.string_list(default = []), - "workspace_file": attr.label(), + "workspace_file": attr.label(allow_single_file = True), "workspace_file_content": attr.string(), } |