Closed
Description
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