Skip to content

Commit

Permalink
Fix compatible property check
Browse files Browse the repository at this point in the history
  • Loading branch information
karataliu committed Feb 2, 2024
1 parent 1226189 commit 7aa6dcf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dotnet/private/rules/publish_binary/publish_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ def _publish_binary_impl(ctx):
elif len(ctx.attr.runtime_packs) > 0:
fail("Can not do a framework dependent publish with a runtime pack")

repo_mapping_file = ctx.attr.binary[0][DefaultInfo].files_to_run.repo_mapping_manifest if ctx.attr.binary[0][DefaultInfo].files_to_run else None
repo_mapping_file = None
# repo_mapping_manifest is only available in Bazel 7.0+
if ctx.attr.binary[0][DefaultInfo].files_to_run and hasattr(ctx.attr.binary[0][DefaultInfo].files_to_run, "repo_mapping_manifest"):
repo_mapping_file = ctx.attr.binary[0][DefaultInfo].files_to_run.repo_mapping_manifest

return [
ctx.attr.binary[0][DotnetAssemblyCompileInfo],
Expand Down

0 comments on commit 7aa6dcf

Please sign in to comment.