Skip to content

Commit

Permalink
Upgrade to the new actions API (#65)
Browse files Browse the repository at this point in the history
In future Bazel releases ctx.file_action will be removed.
ctx.action.write should be used instead.

With this change tests pass even if --incompatible_new_actions_api
is used.

Bazel issue:
bazelbuild/bazel#5825
  • Loading branch information
bttk authored and laurentlb committed Nov 13, 2018
1 parent 6ad5e28 commit 3360231
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/unittest.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ def _end(env):
"EOF",
"exit %d" % len(env.failures),
])
env.ctx.file_action(
env.ctx.actions.write(
output = env.ctx.outputs.executable,
content = cmd,
executable = True,
is_executable = True,
)

def _fail(env, msg):
Expand Down

0 comments on commit 3360231

Please sign in to comment.