Skip to content

Typo in the container declaration leads to null and nextflow using a local tool installation #5814

Closed
@FriederikeHanssen

Description

@FriederikeHanssen

Bug report

When the container definition ends on [], the container itself is not used but the container declaration is set to null. If the tool is available locally, nextflow uses that tool and the script is not portable anymore.

Expected behavior and actual behavior

Such a typo should throw an error and warn the user

Steps to reproduce the problem

I created a small example here: https://github.com/FriederikeHanssen/mre/blob/container_typo/main.nf

The container declaration ends on []. If cowsay is not installed in my local environment the script fails with .command.sh: line 2: cowpy: command not found. However, if I have it installed in my local environment (i.e pip install cowpy ) The script finishes successfully.

Program output

The .command.run:

#!/bin/bash
### ---
### name: 'COWSAY'
### container: 'null'
### ...
set -e
set -u
NXF_DEBUG=${NXF_DEBUG:=0}; [[ $NXF_DEBUG > 1 ]] && set -x
NXF_ENTRY=${1:-nxf_main}

Environment

  • Nextflow version: 24.10.3.5933
  • Operating system: macOS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions