diff --git a/cwltool/draft2tool.py b/cwltool/draft2tool.py index 5e337dfd8..d2288f495 100644 --- a/cwltool/draft2tool.py +++ b/cwltool/draft2tool.py @@ -220,7 +220,7 @@ def makePathMapper(self, reffiles, stagedir, **kwargs): def updatePathmap(self, outdir, pathmap, fn): # type: (Text, PathMapper, Dict) -> None - if "location" in fn: + if "location" in fn and fn["location"] in pathmap: pathmap.update(fn["location"], pathmap.mapper(fn["location"]).resolved, os.path.join(outdir, fn["basename"]), ("Writable" if fn.get("writable") else "") + fn["class"], False) diff --git a/cwltool/pathmapper.py b/cwltool/pathmapper.py index b89a6bad5..6802a91eb 100644 --- a/cwltool/pathmapper.py +++ b/cwltool/pathmapper.py @@ -252,3 +252,6 @@ def reversemap(self, target): # type: (Text) -> Tuple[Text, Text] def update(self, key, resolved, target, type, stage): # type: (Text, Text, Text, Text, bool) -> None self._pathmap[key] = MapperEnt(resolved, target, type, stage) + + def __contains__(self, key): + return key in self._pathmap diff --git a/cwltool/stdfsaccess.py b/cwltool/stdfsaccess.py index 2054ae403..df5056b04 100644 --- a/cwltool/stdfsaccess.py +++ b/cwltool/stdfsaccess.py @@ -67,4 +67,4 @@ def docker_compatible_realpath(self, path): # type: (Text) -> Text if path.startswith('/'): return path return '/'+path - return os.path.realpath(path) + return self.realpath(path) diff --git a/cwltool/workflow.py b/cwltool/workflow.py index 56bd49f13..4bd926b70 100644 --- a/cwltool/workflow.py +++ b/cwltool/workflow.py @@ -673,7 +673,8 @@ def __init__(self, toolpath_object, pos, **kwargs): toolpath_object["run"], kwargs.get("makeTool"), kwargs, enable_dev=kwargs.get("enable_dev"), strict=kwargs.get("strict"), - fetcher_constructor=kwargs.get("fetcher_constructor")) + fetcher_constructor=kwargs.get("fetcher_constructor"), + resolver=kwargs.get("resolver")) except validate.ValidationException as v: raise WorkflowException( u"Tool definition %s failed validation:\n%s" %