File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 2222from . import process , update
2323from .errors import WorkflowException
2424from .process import Process , shortname
25+ from .update import ALLUPDATES
26+ from .main import supportedCWLversions
2527
2628_logger = logging .getLogger ("cwltool" )
2729
@@ -161,6 +163,8 @@ def validate_document(document_loader, # type: Loader
161163 if "cwlVersion" in workflowobj :
162164 if not isinstance (workflowobj ["cwlVersion" ], (str , Text )):
163165 raise Exception ("'cwlVersion' must be a string, got %s" % type (workflowobj ["cwlVersion" ]))
166+ if workflowobj ["cwlVersion" ] not in list (ALLUPDATES ):
167+ raise ValidationException ("'cwlVersion' not valid. Supported CWL versions are: " , supportedCWLversions (enable_dev = False ))
164168 workflowobj ["cwlVersion" ] = re .sub (
165169 r"^(?:cwl:|https://w3id.org/cwl/cwl#)" , "" ,
166170 workflowobj ["cwlVersion" ])
You can’t perform that action at this time.
0 commit comments