Skip to content

Commit ce888a1

Browse files
committed
load_tool: when no version is found, raise Validation exception
1 parent db6c439 commit ce888a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cwltool/load_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ def validate_document(document_loader, # type: Loader
165165
r"^(?:cwl:|https://w3id.org/cwl/cwl#)", "",
166166
workflowobj["cwlVersion"])
167167
else:
168-
_logger.warning("No cwlVersion found, treating this file as draft-2.")
169-
workflowobj["cwlVersion"] = "draft-2"
168+
raise ValidationException("No cwlVersion found."
169+
"Use the following syntax in your CWL workflow to declare version: cwlVersion: <version>")
170170

171171
if workflowobj["cwlVersion"] == "draft-2":
172172
workflowobj = cast(CommentedMap, cmap(update._draft2toDraft3dev1(

0 commit comments

Comments
 (0)