X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8b7d63024652c112973d4dd82f9a5d89cc624fc7..9bc524ae6d516f1be41cc8a7c6a76a96bbd9578c:/sdk/cwl/arvados_cwl/pathmapper.py diff --git a/sdk/cwl/arvados_cwl/pathmapper.py b/sdk/cwl/arvados_cwl/pathmapper.py index ffdade0f5e..0fd9a0ed33 100644 --- a/sdk/cwl/arvados_cwl/pathmapper.py +++ b/sdk/cwl/arvados_cwl/pathmapper.py @@ -6,7 +6,7 @@ import os import arvados.commands.run import arvados.collection -from cwltool.pathmapper import PathMapper, MapperEnt, abspath +from cwltool.pathmapper import PathMapper, MapperEnt, abspath, adjustFileObjs, adjustDirObjs from cwltool.workflow import WorkflowException logger = logging.getLogger('arvados.cwl-runner') @@ -42,8 +42,11 @@ class ArvPathMapper(PathMapper): uploadfiles.add((src, ab, st)) elif isinstance(st, arvados.commands.run.ArvFile): self._pathmap[src] = MapperEnt(ab, st.fn, "File") - elif src.startswith("_:") and "contents" in srcobj: - pass + elif src.startswith("_:"): + if "contents" in srcobj: + pass + else: + raise WorkflowException("File literal '%s' is missing contents" % src) else: raise WorkflowException("Input file path '%s' is invalid" % st) if "secondaryFiles" in srcobj: