Skip to content

Commit

Permalink
Fix bazel run_shell usage for newer versions
Browse files Browse the repository at this point in the history
The Bazel option `--incompatible_run_shell_command_string` is going to be flipped to true in upcoming Bazel 4.0 release per default, see: [1] for more details.

Test Plan:

  bazel build :release

[1] bazelbuild/bazel#5903

Bug: Issue 13612
Change-Id: Icc9589906198386b1e4805ceeabbb420a7ea1afb
(cherry picked from commit c1f4e91)
  • Loading branch information
keith authored and David Ostrovsky committed Nov 24, 2020
1 parent 7afd9bc commit 7e22ca2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/bzl/asciidoc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ def documentation_attributes():
]

def _replace_macros_impl(ctx):
cmd = [
ctx.file._exe.path,
args = [
"--suffix",
ctx.attr.suffix,
"-s",
Expand All @@ -28,13 +27,14 @@ def _replace_macros_impl(ctx):
ctx.outputs.out.path,
]
if ctx.attr.searchbox:
cmd.append("--searchbox")
args.append("--searchbox")
else:
cmd.append("--no-searchbox")
ctx.actions.run_shell(
args.append("--no-searchbox")
ctx.actions.run(
inputs = [ctx.file._exe, ctx.file.src],
outputs = [ctx.outputs.out],
command = cmd,
executable = ctx.file._exe.path,
arguments = args,
use_default_shell_env = True,
progress_message = "Replacing macros in %s" % ctx.file.src.short_path,
)
Expand Down

0 comments on commit 7e22ca2

Please sign in to comment.