Skip to content

Commit

Permalink
add the comment explaining the logic back
Browse files Browse the repository at this point in the history
  • Loading branch information
shabanzd committed Jan 4, 2024
1 parent 6cee656 commit 2fbb06b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/private/bzlmod/python.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def _print_warn(msg):
def _python_register_toolchains(name, toolchain_attr, module):
"""Calls python_register_toolchains and returns a struct used to collect the toolchains.
"""
# Only the root module should have a say on whether or not to ignore the root user
# error. This can be achieved by taking the ignore_root_user_error for the root
# module. For all other modules, the ignore_root_user_error attr is set to True.
ignore_root_user_error = toolchain_attr.ignore_root_user_error
ignore_root_user_error = not (module.is_root and toolchain_attr.ignore_root_user_error)
python_register_toolchains(
name = name,
Expand Down

0 comments on commit 2fbb06b

Please sign in to comment.