Skip to content

Conversation

@tetron
Copy link
Member

@tetron tetron commented Jun 10, 2019

Example of combining this feature with attachments (common-workflow-language/schema_salad#254) to simplify wrapping an inline bash script:

#!/usr/bin/env cwl-runner cwlVersion: v1.0 class: CommandLineTool $namespaces: cwltool: "http://commonwl.org/cwltool#" baseCommand: [/bin/sh, script] requirements: cwltool:SubstitutionPrefix: substitutionPrefix: "@" InitialWorkDirRequirement: listing: - entryname: script entry: {$include: "#attachment-1"} inputs: msg: string outputs: output: type: File outputBinding: glob: output.txt --- | echo Zip@(inputs.msg) $(date) > output.txt 
@mr-c
Copy link
Member

mr-c commented Jun 11, 2019

For your example I would demonstrate use of EnvVarRequirement and turn off the substitution altogether

@multimeric
Copy link

I like it. I think having this would solve a lot of issues.

However I still believe InitialWorkDirRequirement is not the most logical place for the inclusion of scripts. We still need a construct that is intuitively for including scripts and setting them as the tool's command, which is where my ScriptTool proposal etc come in. That said we could reasonably add this substitutionPrefix feature in independently from any better mechanism for referring to scripts.

@mr-c mr-c changed the base branch from master to main July 2, 2020 11:21
@mr-c mr-c marked this pull request as draft December 3, 2020 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants