Weird bug: workdir missing output file but results has output file, when mode=copy

nextflow.enable.dsl=2

process TEST_MODULE {
    tag "${name}"
    publishDir 'results', mode: 'copy'

    input:
    val(name)

    output:
        path("logs/${name}_out.txt")

    script:
        name = "lol"
        """
        mkdir -p logs
        echo "'test' ${name}" > logs/${name}_out.txt
        """
}

workflow {
    output_ch=TEST_MODULE("lol")
    output_ch.map { file -> 
      println file.text
    }
    output_ch.view()
}

after running

nextflow main.nf 

 N E X T F L O W   ~  version 24.04.4

executor >  local (1)
[fd/105717] TEST_MODULE (lol) [100%] 1 of 1 ✔
some_path/work/fd/105717d5189a04aa3aef79a47fda5b/logs/lol_out.txt
'test' lol

It prints the content of the _out.txt

and in the results dir, it has the file.

however the work dir link does not have the _out.txt file

some_path/work/fd/105717d5189a04aa3aef79a47fda5b/logs/lol_out.txt

if i go into work dir and run bash .command.run, then the correct file is generated.

It seems like it is behaving like mode: ‘move’
however I did have mode: ‘copy’

i had boost clean up on true. problem solved

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.