Skip to content

Commit

Permalink
Bugfix: call to rules_apko target from another repository was failing (
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ptabor authored Nov 30, 2023
1 parent 207ff7a commit d8f33ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apko/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ bzl_library(
name = "apko_image",
srcs = ["apko_image.bzl"],
visibility = ["//apko:__subpackages__"],
deps = ["apko_run"],
deps = [
"apko_run",
"@bazel_skylib//:lib",
],
)

bzl_library(
Expand Down
3 changes: 2 additions & 1 deletion apko/private/apko_image.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"A rule for running apko with prepopulated cache"

load("//apko/private:apko_run.bzl", "apko_run")
load("@bazel_skylib//lib:paths.bzl", "paths")

_ATTRS = {
"contents": attr.label(doc = "Label to the contents repository generated by translate_lock. See [apko-cache](./apko-cache.md) documentation.", mandatory = True),
Expand Down Expand Up @@ -31,7 +32,7 @@ def _impl(ctx):

args.add_all(ctx.attr.args)

args.add("--cache-dir={}/{}/{}".format(ctx.bin_dir.path, ctx.label.package, cache_name))
args.add("--cache-dir={}".format(paths.join(ctx.bin_dir.path, ctx.label.workspace_root, ctx.label.package, cache_name)))
args.add("--offline")

if ctx.attr.architecture:
Expand Down

0 comments on commit d8f33ae

Please sign in to comment.