Skip to content

Commit 13084e4

Browse files
authored
Merge pull request #386 from chapmanb/no-container-fix
No DockerCommandLineJob when use_container=False
2 parents e441522 + eb75632 commit 13084e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cwltool/draft2tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import shellescape
1515
from schema_salad.ref_resolver import file_uri, uri_file_path
1616
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
1818

1919
from .builder import CONTENT_LIMIT, substitute, Builder
2020
from .pathmapper import adjustFileObjs, adjustDirObjs, visit_class
@@ -172,9 +172,9 @@ def __init__(self, toolpath_object, **kwargs):
172172
# type: (Dict[Text, Any], **Any) -> None
173173
super(CommandLineTool, self).__init__(toolpath_object, **kwargs)
174174

175-
def makeJobRunner(self): # type: () -> JobBase
175+
def makeJobRunner(self, use_container=True): # type: (Optional[bool]) -> JobBase
176176
dockerReq, _ = self.get_requirement("DockerRequirement")
177-
if dockerReq:
177+
if dockerReq and use_container:
178178
return DockerCommandLineJob()
179179
else:
180180
return CommandLineJob()
@@ -268,7 +268,7 @@ def rm_pending_output_callback(output_callbacks, jobcachepending,
268268

269269
reffiles = copy.deepcopy(builder.files)
270270

271-
j = self.makeJobRunner()
271+
j = self.makeJobRunner(kwargs.get("use_container"))
272272
j.builder = builder
273273
j.joborder = builder.job
274274
j.stdin = None

0 commit comments

Comments
 (0)