Skip to content

Clarify, make explicit, and add conformance test if CommandLineTool requires a baseCommand vs being a no-op #818

@whlavina

Description

@whlavina

Per the specification for CommandLineTool and its baseCommand:

If baseCommand is not provided or is an empty array, the first element of the command line produced after processing inputBinding or arguments must be used as the program to execute.

The wording and reference to the "first element" seems to imply there must be a command to execute, but this is not stated explicitly. There are use cases for a "no-op" command, such as when combined with InitialWorkDirRequirement or otherwise passing inputs to different outputs as a passthrough node in a graph.

In particular, it seems that cwltool allows a CommandLineTool without any baseCommand under some conditions (e.g. if there's a Docker image associated), while other runners like Rabix fail on such cases.

I recommend making the specification more explicit, and adding conformance tests.

As example, consider this naive conformance test, which "passes" in cwltool but fails in other runners:

#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
requirements:
    - class: DockerRequirement
      dockerPull: ubuntu
inputs: []
outputs: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions