diff options
author | Klaus Aehlig <aehlig@google.com> | 2018-08-09 07:26:23 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-08-09 07:27:44 -0700 |
commit | 319157b3d77f7fd1fcd811815328d73d65a8d694 (patch) | |
tree | 3a8428232bb2f210352bc1d9cef8a8c6cb3fba9e /tools | |
parent | d4c627fd34b117464eab5bc7f4053ea0639efb42 (diff) |
external repos: fix typo confusing workspace_file_content and build_file_content
Fixes #5838
Change-Id: Ic5f730f97b43682b1efc537a02c861d49d3606cc
PiperOrigin-RevId: 208044984
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_defs/repo/utils.bzl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/build_defs/repo/utils.bzl b/tools/build_defs/repo/utils.bzl index e23556cce6..8a1ecaa291 100644 --- a/tools/build_defs/repo/utils.bzl +++ b/tools/build_defs/repo/utils.bzl @@ -29,8 +29,9 @@ load( def workspace_and_buildfile(ctx): """Utility function for writing WORKSPACE and, if requested, a BUILD file. - It assumes the paramters name, build_file, and build_file_contents to be - present in ctx.attr, the latter two possibly with value None. + It assumes the parameters name, build_file, build_file_contents, + workspace_file, and workspace_file_content to be + present in ctx.attr, the latter four possibly with value None. Args: ctx: The repository context of the repository rule calling this utility @@ -49,7 +50,7 @@ def workspace_and_buildfile(ctx): elif ctx.attr.workspace_file_content: bash_exe = ctx.os.environ["BAZEL_SH"] if "BAZEL_SH" in ctx.os.environ else "bash" ctx.execute([bash_exe, "-c", "rm -f WORKSPACE"]) - ctx.file("WORKSPACE", ctx.attr.build_file_content) + ctx.file("WORKSPACE", ctx.attr.workspace_file_content) else: ctx.file("WORKSPACE", "workspace(name = \"{name}\")\n".format(name = ctx.name)) |