diff options
| author | Arun Isaac | 2025-11-30 00:59:49 +0000 |
|---|---|---|
| committer | Arun Isaac | 2025-11-30 01:46:01 +0000 |
| commit | c5bccca30b03f6dfef5d6efaaafc20fa9b25f164 (patch) | |
| tree | af1db1c574497fd379491e750c4c7cfc2dd39fab | |
| parent | 02465beace67ae6be4f3ef44f3cb01f0c432571a (diff) | |
| download | ravanan-c5bccca30b03f6dfef5d6efaaafc20fa9b25f164.tar.gz ravanan-c5bccca30b03f6dfef5d6efaaafc20fa9b25f164.tar.lz ravanan-c5bccca30b03f6dfef5d6efaaafc20fa9b25f164.zip | |
command-line-tool: Handle absent arguments field.
| -rw-r--r-- | e2e-tests/tests.yaml | 9 | ||||
| -rw-r--r-- | e2e-tests/tools/command-line-tool-without-arguments.cwl | 12 | ||||
| -rw-r--r-- | ravanan/command-line-tool.scm | 3 |
3 files changed, 23 insertions, 1 deletions
diff --git a/e2e-tests/tests.yaml b/e2e-tests/tests.yaml index bc4639c..6f561a8 100644 --- a/e2e-tests/tests.yaml +++ b/e2e-tests/tests.yaml @@ -223,3 +223,12 @@ class: File size: 6 checksum: sha1$d493abaf2d0ffe0bec8d302fdee38a43e80d2a91 +- id: command-line-tool-without-arguments + doc: CommandLineTool without the arguments field + tool: tools/command-line-tool-without-arguments.cwl + job: jobs/hello-world.yaml + output: + output_message: + class: File + size: 13 + checksum: sha1$47a013e660d408619d894b20806b1d5086aab03b diff --git a/e2e-tests/tools/command-line-tool-without-arguments.cwl b/e2e-tests/tools/command-line-tool-without-arguments.cwl new file mode 100644 index 0000000..f0440b0 --- /dev/null +++ b/e2e-tests/tools/command-line-tool-without-arguments.cwl @@ -0,0 +1,12 @@ +cwlVersion: v1.2 +class: CommandLineTool +baseCommand: + - echo +inputs: + message: + type: string + inputBinding: + position: 1 +outputs: + output_message: + type: stdout diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm index c1cd53e..fd988f7 100644 --- a/ravanan/command-line-tool.scm +++ b/ravanan/command-line-tool.scm @@ -508,7 +508,8 @@ named @var{name} using tools from Guix manifest in @var{manifest-file} and on (build-command #$(assoc-ref cwl "baseCommand") #$(vector->gexp (vector-map (compose alist->gexp coerce-argument) - (assoc-ref cwl "arguments"))) + (or (assoc-ref cwl "arguments") + #()))) #$(assoc-ref cwl "inputs") inputs)) #$(coerce-expression (assoc-ref cwl "stdin")) |
