Skip to content

Commit 6fd0b23

Browse files
authored
Merge pull request #144 from common-workflow-language/inputbinding-dir
Fix command line inputBinding of Directory input parameter.
2 parents 8e757d4 + f6297c3 commit 6fd0b23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cwltool/builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def _capture_files(f):
144144
return bindings
145145

146146
def tostr(self, value): # type: (Any) -> str
147-
if isinstance(value, dict) and value.get("class") == "File":
147+
if isinstance(value, dict) and value.get("class") in ("File", "Directory"):
148148
if "path" not in value:
149-
raise WorkflowException(u"File object must have \"path\": %s" % (value))
149+
raise WorkflowException(u"%s object missing \"path\": %s" % (value["class"], value))
150150
return value["path"]
151151
else:
152152
return str(value)
@@ -170,7 +170,7 @@ def generate_arg(self, binding): # type: (Dict[str,Any]) -> List[str]
170170
return [prefix]
171171
else:
172172
return []
173-
elif isinstance(value, dict) and value.get("class") == "File":
173+
elif isinstance(value, dict) and value.get("class") in ("File", "Directory"):
174174
l = [value]
175175
elif isinstance(value, dict):
176176
return [prefix] if prefix else []

0 commit comments

Comments
 (0)