|
14 | 14 | import shellescape
|
15 | 15 | from schema_salad.ref_resolver import file_uri, uri_file_path
|
16 | 16 | from schema_salad.sourceline import SourceLine, indent
|
17 |
| -from typing import Any, Callable, cast, Generator, Text, Union, Dict |
| 17 | +from typing import Any, Callable, cast, Generator, Optional, Text, Union, Dict |
18 | 18 |
|
19 | 19 | from .builder import CONTENT_LIMIT, substitute, Builder
|
20 | 20 | from .pathmapper import adjustFileObjs, adjustDirObjs, visit_class
|
@@ -172,9 +172,9 @@ def __init__(self, toolpath_object, **kwargs):
|
172 | 172 | # type: (Dict[Text, Any], **Any) -> None
|
173 | 173 | super(CommandLineTool, self).__init__(toolpath_object, **kwargs)
|
174 | 174 |
|
175 |
| - def makeJobRunner(self): # type: () -> JobBase |
| 175 | + def makeJobRunner(self, use_container=True): # type: (Optional[bool]) -> JobBase |
176 | 176 | dockerReq, _ = self.get_requirement("DockerRequirement")
|
177 |
| - if dockerReq: |
| 177 | + if dockerReq and use_container: |
178 | 178 | return DockerCommandLineJob()
|
179 | 179 | else:
|
180 | 180 | return CommandLineJob()
|
@@ -268,7 +268,7 @@ def rm_pending_output_callback(output_callbacks, jobcachepending,
|
268 | 268 |
|
269 | 269 | reffiles = copy.deepcopy(builder.files)
|
270 | 270 |
|
271 |
| - j = self.makeJobRunner() |
| 271 | + j = self.makeJobRunner(kwargs.get("use_container")) |
272 | 272 | j.builder = builder
|
273 | 273 | j.joborder = builder.job
|
274 | 274 | j.stdin = None
|
|
0 commit comments