Skip to content

Try to run "CWLFile" by default if no file provided #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cwltool/load_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def validate_document(document_loader, workflowobj, uri,
"""Validate a CWL document."""
jobobj = None
if "cwl:tool" in workflowobj:
jobobj = workflowobj
uri = urlparse.urljoin(uri, jobobj["cwl:tool"])
del jobobj["cwl:tool"]
jobobj, _ = document_loader.resolve_all(workflowobj, uri)
uri = urlparse.urljoin(uri, workflowobj["https://w3id.org/cwl/cwl#tool"])
del cast(dict, jobobj)["https://w3id.org/cwl/cwl#tool"]
workflowobj = fetch_document(uri)[1]

if isinstance(workflowobj, list):
Expand Down
9 changes: 6 additions & 3 deletions cwltool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,12 @@ def main(argsl=None,
_logger.info(versionfunc())

if not args.workflow:
_logger.error("")
_logger.error("CWL document required, try --help for details")
return 1
if os.path.isfile("CWLFile"):
setattr(args, "workflow", "CWLFile")
else:
_logger.error("")
_logger.error("CWL document required, try --help for details")
return 1

try:
document_loader, workflowobj, uri = fetch_document(args.workflow)
Expand Down