From 6acb01974d295916fde4516fb43b318ec65aa181 Mon Sep 17 00:00:00 2001 From: Tobias Slettemoen Kongsvik Date: Tue, 17 Oct 2023 10:27:13 +0200 Subject: [PATCH] Use ctx.actions.run instead of run_shell --- lint/ruff.bzl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lint/ruff.bzl b/lint/ruff.bzl index 4b48a85b..7d0cde74 100644 --- a/lint/ruff.bzl +++ b/lint/ruff.bzl @@ -31,16 +31,16 @@ def ruff_action(ctx, executable, srcs, config, report, use_exit_code = False): args = ctx.actions.args() args.add("check") args.add(config, format = "--config=%s") + args.add(report, format = "--ouput-file=%s") if not use_exit_code: args.add("--exit-zero") args.add_all(srcs) - ctx.actions.run_shell( + ctx.actions.run( inputs = inputs, outputs = outputs, - tools = [executable], - command = "%s $@ > %s" % (executable.path, report.path), + executable = executable, arguments = [args], mnemonic = "ruff", ) @@ -94,4 +94,3 @@ def ruff_aspect(binary, config): ), }, ) -