File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -786,7 +786,9 @@ def _create_stage1_bootstrap(
786786 )
787787 template = runtime .bootstrap_template
788788 subs ["%shebang%" ] = runtime .stub_shebang
789- elif main_py :
789+ elif not ctx .files .srcs :
790+ fail ("mandatory 'srcs' files have not been provided" )
791+ else :
790792 if (ctx .configuration .coverage_enabled and
791793 runtime and
792794 runtime .coverage_tool ):
@@ -807,8 +809,6 @@ def _create_stage1_bootstrap(
807809 subs ["%import_all%" ] = ("True" if ctx .fragments .bazel_py .python_import_all_repositories else "False" )
808810 subs ["%imports%" ] = ":" .join (imports .to_list ())
809811 subs ["%main%" ] = "{}/{}" .format (ctx .workspace_name , main_py .short_path )
810- else :
811- fail ("mandatory 'srcs' attribute has not been specified" )
812812
813813 ctx .actions .expand_template (
814814 template = template ,
You can’t perform that action at this time.
0 commit comments