Skip to content

Commit 0b1fdad

Browse files
committed
Use file:/// with cwltool to ensure #anchors work
1 parent c980e44 commit 0b1fdad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/commonwl/view/cwl/CWLService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ public Workflow parseWorkflowWithCwltool(Workflow basicModel,
250250

251251
// Get paths to workflow
252252
String url = basicModel.getIdentifier();
253-
String localPath = workflowFile.toAbsolutePath().toString();
253+
String workflowFileURI = workflowFile.toUri().toString();
254+
String localPath = workflowFileURI;
254255
String gitPath = gitDetails.getPath();
255256
if (packedWorkflowID != null) {
256257
if (packedWorkflowID.charAt(0) != '#') {
@@ -264,7 +265,7 @@ public Workflow parseWorkflowWithCwltool(Workflow basicModel,
264265
// Get RDF representation from cwltool
265266
if (!rdfService.graphExists(url)) {
266267
String rdf = cwlTool.getRDF(localPath);
267-
rdf = rdf.replace("file://" + workTree.toAbsolutePath().toString(),
268+
rdf = rdf.replace(workflowFileURI,
268269
"https://w3id.org/cwl/view/git/" + latestCommit);
269270
// Workaround for common-workflow-language/cwltool#427
270271
rdf = rdf.replace("<rdfs:>", "<http://www.w3.org/2000/01/rdf-schema#>");

0 commit comments

Comments
 (0)