Skip to content

Commit 1a90380

Browse files
committed
Add update boolean parameter to load_tool.validate.
1 parent 01e6bda commit 1a90380

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cwltool/load_tool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def fetch_document(argsworkflow):
4242

4343

4444
def validate_document(document_loader, workflowobj, uri,
45-
enable_dev=False, strict=True, preprocess_only=False):
46-
# type: (Loader, Dict[unicode, Any], unicode, bool, bool, bool) -> Tuple[Loader, Names, Any, Dict[str, str], unicode]
45+
enable_dev=False, strict=True, preprocess_only=False, update=True):
46+
# type: (Loader, Dict[unicode, Any], unicode, bool, bool, bool, bool) -> Tuple[Loader, Names, Any, Dict[str, str], unicode]
4747
"""Validate a CWL document."""
4848
jobobj = None
4949
if "cwl:tool" in workflowobj:
@@ -93,7 +93,7 @@ def validate_document(document_loader, workflowobj, uri,
9393
"$schemas": processobj.get("$schemas", []),
9494
"cwlVersion": processobj["cwlVersion"]}
9595

96-
if metadata.get("cwlVersion") != update.LATEST:
96+
if update and metadata.get("cwlVersion") != update.LATEST:
9797
processobj = update.update(
9898
processobj, document_loader, fileuri, enable_dev, metadata)
9999

0 commit comments

Comments
 (0)