Skip to content

Subworkflow install failure still results in a 0 exit code #3044

Open
@jvfe

Description

@jvfe

Description of the bug

When installing a subworkflow, if tools can't find a module within this subworkflow it raises an error message, but the error code returned at the end is still 0, making it seem like the command succeeded. This is done in order to not break the execution and install the most modules possible.

A solution suggested on the nf-core slack is to have a has_error variable that persists through the execution, so it still finishes installing the modules but returns a non-zero code at the end.

Command used and terminal output

nf-core create --name test --plain --description test --author test
cd nf-core-test
nf-core subworkflows --git-remote https://github.com/jvfe/test-subworkflow-remote install hic_bwamem2
# ERROR    Module 'samtools/merge' not found in list of available modules.
echo $?

System information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions