Skip to content

Using strict syntax causes template to raise an error when setting boolean options on CLI #4100

@scwatts

Description

@scwatts

When using strict syntax to run a pipeline created by the nf-core/tools template, if a boolean option is defined in the schema with default as false and is then supplied on the CLI, the following error is encountered:

ERROR ~ Validation of pipeline parameters failed!

 -- Check '.nextflow.log' file for details
The following invalid input values have been detected:

* --my_boolean_option (true): Value is [string] but should be [boolean]

This error only occurs when using Nextflow 25.10.4 with strict syntax enabled or Nextflow 26.02.0-edge (where strict syntax is enabled by default). No error occurs when running via Nextflow 25.10.4 with strict syntax is disabled.

Please see scwatts/nf-core-template-boolean-option-strict-syntax-error for a simple reproducible example.

Also possibly relevant is the nf-core Slack thread


Nextflow version: 25.10.4 / 26.02.0-edge
Hardware: MacBook Pro
Executor: local
OS: macOS
nf-core/tools version: 3.5.2 / dev (56f3910)
Python version: 3.11.4

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