Skip to content

Commit

Permalink
support nolegacy_external_runfiles flag
Browse files Browse the repository at this point in the history
  • Loading branch information
slamdev committed Nov 10, 2021
1 parent 52fa7d6 commit cee4587
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Bazel settings that apply to this repository.
# Take care to document any settings that you expect users to apply.
# Settings that apply only to CI are in .github/workflows/ci.bazelrc

build --nolegacy_external_runfiles

# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
Expand Down
2 changes: 1 addition & 1 deletion kubedog/private/rules/multitrack.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _ATTRS = {
def _impl(ctx):
cmd = ["cat", ctx.file.resources_spec.short_path, "|"]

cmd += [ctx.var["KUBEDOG_BIN"], "multitrack"]
cmd += [ctx.var["KUBEDOG_RUNFILES_BIN"], "multitrack"]
cmd += ["--timeout", str(ctx.attr.timeout)]
cmd += ["--logs-since", ctx.attr.logs_since]

Expand Down
2 changes: 2 additions & 0 deletions kubedog/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def _kubedog_toolchain_impl(ctx):
# See https://docs.bazel.build/versions/main/be/make-variables.html#custom_variables
template_variables = platform_common.TemplateVariableInfo({
"KUBEDOG_BIN": target_tool_path,
# Variable to use with disabled legacy_external_runfiles
"KUBEDOG_RUNFILES_BIN": target_tool_path.replace("external/", "../", 1)
})
default = DefaultInfo(
files = depset(tool_files),
Expand Down

0 comments on commit cee4587

Please sign in to comment.