Skip to content

Commit

Permalink
fix: subpackages.all works for root packages (#530) (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
kilian-funk authored Jul 12, 2024
1 parent 27d429d commit 32bbb52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/subpackages.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ def _all(exclude = [], allow_empty = False, fully_qualified = True):
return subs

def _fully_qualified(relative_path):
return "//%s/%s" % (native.package_name(), relative_path)
package_name = native.package_name()
if package_name:
return "//%s/%s" % (package_name, relative_path)
return "//" + relative_path

def _exists(relative_path):
"""Checks to see if relative_path is a direct subpackage of the current package.
Expand Down

0 comments on commit 32bbb52

Please sign in to comment.