nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Error message for invalid config selector incorrectly refers to script as error source

Open sav-che opened this issue 5 months ago • 1 comments

Bug report

Wrong error message appears when trying to use breaking withName: '*' or "*" in a .config file. Instead error points to .nf file

Expected behavior

Error pointing to .config file.

Steps to reproduce the problem

Make a nextflow.config like below and run any workflow nextflow run main.nf -profile test

profiles {
    test {
        process {
            withName: '*' {
                cpus = 1
            }
        }
    }
}

Program output

ERROR ~ Dangling meta character '*' near index 0
*
^

 -- Check script 'main.nf' at line: 98 or see '.nextflow.log' file for more details

(There is no * at line 98 of main.nf)

Environment

  • Nextflow version: 25.10.0
  • Operating system: Linux
  • Bash version: 4.4.20(1)-release

sav-che avatar Nov 20 '25 14:11 sav-che

The error seems to depend on the script. I tried with a minimal script and got a better error:

$ cat nextflow.config 
profiles {
    test {
        process {
            withName: '*' {
                cpus = 1
            }
        }
    }
}

$ cat main.nf
process test {
    script:
    '''
    '''
}

workflow {
}

$ nextflow run main.nf -profile test

ERROR ~ Dangling meta character '*' near index 0
*
^

 -- Check '.nextflow.log' file for details

bentsherman avatar Nov 20 '25 20:11 bentsherman