Skip to content

Commit

Permalink
chore: improve error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Oct 3, 2024
1 parent 95ad08c commit c44466f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resolutions = _resolutions

def _py_binary_or_test(name, rule, srcs, main, deps = [], resolutions = {}, **kwargs):
if type(main) not in ["string", "Label"]:
fail("main must be a Label or a string")
fail("main must be a Label or a string, not {}".format(type(main)))

# Compatibility with rules_python, see docs in py_executable.bzl
main_target = "_{}.find_main".format(name)
Expand Down

0 comments on commit c44466f

Please sign in to comment.