@@ -2,7 +2,7 @@ load("@bazel_skylib//lib:shell.bzl", "shell")
22load ("//util:path.bzl" , "output_name" , "runfile_path" )
33load (":providers.bzl" , "FormatterInfo" )
44
5- def _create_runner (runfiles_fn , name , bash_runfiles , actions , bin , diff_bin , dir_mode , file_mode , run_bin , runner_template , file_defs , workspace_name ):
5+ def _create_runner (runfiles_fn , name , bash_runfiles , actions , bin , diff_bin , dir_mode , file_mode , label , run_bin , runner_template , file_defs , workspace_name ):
66 check_args = ["--" ]
77 write_args = []
88 diffs = []
@@ -41,6 +41,7 @@ def _create_runner(runfiles_fn, name, bash_runfiles, actions, bin, diff_bin, dir
4141 substitutions = {
4242 "%{check_args}" : shell .quote (runfile_path (workspace_name , check_args_file )),
4343 "%{dir_mode}" : shell .quote (dir_mode ),
44+ "%{label}" : shell .quote (str (label )),
4445 "%{file_mode}" : shell .quote (file_mode ),
4546 "%{write_args}" : shell .quote (runfile_path (workspace_name , write_args_file )),
4647 },
@@ -95,6 +96,7 @@ def _format_impl(ctx):
9596 dir_mode = dir_mode ,
9697 file_defs = file_defs ,
9798 file_mode = file_mode ,
99+ label = label ,
98100 name = name ,
99101 run_bin = run ,
100102 runfiles_fn = ctx .runfiles ,
@@ -211,6 +213,7 @@ def _generate_impl(ctx):
211213 dir_mode = dir_mode ,
212214 file_defs = file_defs ,
213215 file_mode = file_mode ,
216+ label = label ,
214217 name = name ,
215218 run_bin = run ,
216219 runfiles_fn = ctx .runfiles ,
0 commit comments