From 5f755fd174c0a55be7fd8476a4bce4bd4bbba115 Mon Sep 17 00:00:00 2001 From: Mai Hussien <70515749+mai93@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:21:44 -0700 Subject: [PATCH] Replace `ctx.build_file_path` --- rules/license_impl.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/license_impl.bzl b/rules/license_impl.bzl index 3aa13de..18b8570 100644 --- a/rules/license_impl.bzl +++ b/rules/license_impl.bzl @@ -36,7 +36,7 @@ def license_rule_impl(ctx): provider = LicenseInfo( license_kinds = tuple([k[LicenseKindInfo] for k in ctx.attr.license_kinds]), copyright_notice = ctx.attr.copyright_notice, - package_name = ctx.attr.package_name or ctx.build_file_path.rstrip("/BUILD"), + package_name = ctx.attr.package_name or ctx.label.package, package_url = ctx.attr.package_url, package_version = ctx.attr.package_version, license_text = ctx.file.license_text,