@@ -592,12 +592,13 @@ def main(argsl=None, # type: List[str]
592
592
conf_file = getattr (args , "beta_dependency_resolvers_configuration" , None ) # Text
593
593
use_conda_dependencies = getattr (args , "beta_conda_dependencies" , None ) # Text
594
594
595
- job_script_provider = None # type: Optional[DependenciesConfiguration]
596
595
if conf_file or use_conda_dependencies :
597
596
runtimeContext .job_script_provider = DependenciesConfiguration (args )
598
597
599
- runtimeContext .find_default_container = \
600
- functools .partial (find_default_container , args )
598
+ runtimeContext .find_default_container = functools .partial (
599
+ find_default_container ,
600
+ default_container = runtimeContext .default_container ,
601
+ use_biocontainers = args .beta_use_biocontainers )
601
602
runtimeContext .make_fs_access = getdefault (runtimeContext .make_fs_access , StdFsAccess )
602
603
(out , status ) = executor (tool ,
603
604
initialized_job_order_object ,
@@ -674,14 +675,14 @@ def loc_to_path(obj):
674
675
_logger .addHandler (defaultStreamHandler )
675
676
676
677
677
- def find_default_container (args , builder ):
678
- # type: (argparse.Namespace, HasReqsHints) -> Optional[ Text]
679
- default_container = None
680
- if args . default_container :
681
- default_container = args . default_container
682
- elif args . beta_use_biocontainers :
683
- default_container = get_container_from_software_requirements (args , builder )
684
-
678
+ def find_default_container (builder , # type: HasReqsHints
679
+ default_container = None , # type: Text
680
+ use_biocontainers = None , # type: bool
681
+ ): # type: (...) -> Optional[Text]
682
+ """Default finder for default containers."""
683
+ if not default_container and use_biocontainers :
684
+ default_container = get_container_from_software_requirements (
685
+ use_biocontainers , builder )
685
686
return default_container
686
687
687
688
0 commit comments