Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion python/uv/private/lock.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,15 @@ def _maybe_file(path):
def _expand_template_impl(ctx):
pkg = ctx.label.package
update_src = ctx.actions.declare_file(ctx.attr.update_target + ".py")

# Fix the path construction to avoid absolute paths
# If package is empty (root), don't add a leading slash
dst = ctx.attr.output if pkg == "" else "{}/{}".format(pkg, ctx.attr.output)

ctx.actions.expand_template(
template = ctx.files._template[0],
substitutions = {
"{{dst}}": "{}/{}".format(pkg, ctx.attr.output),
"{{dst}}": dst,
"{{src}}": "{}".format(ctx.files.src[0].short_path),
"{{update_target}}": "//{}:{}".format(pkg, ctx.attr.update_target),
},
Expand Down