tools icon indicating copy to clipboard operation
tools copied to clipboard

Subworkflow install failure still results in a 0 exit code

Open jvfe opened this issue 1 year ago • 5 comments

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

jvfe avatar Jul 01 '24 11:07 jvfe

Is this a duplicate of https://github.com/nf-core/tools/issues/2928 ?

ewels avatar Sep 09 '24 12:09 ewels

Is this a duplicate of #2928 ?

While similar, I don't think they mention the exact same thing. The issue there seems to be related to the name of the subworkflow (slashes vs underscores). Here the issue I'm trying to point to is the exit code of the install process, which seems to imply a success even though the subworkflow wasn't fully installed.

jvfe avatar Sep 09 '24 12:09 jvfe

Is this fixed in https://github.com/nf-core/tools/pull/3083 ?

ewels avatar Nov 21 '24 09:11 ewels

Is this fixed in #3083 ?

Sorry about the super late reply! But no, even though this issue is probably a simpler fix to write, 3083 didn't include it.

jvfe avatar Mar 21 '25 19:03 jvfe