Skip to content

Bug: temp() output files are copied to output #58

@kilpert

Description

@kilpert

Output files marked with temp() are copied from the local cache to the output. The expectation, however, is that those temp files are not kept.

An example Snakefile:

rule all:
    input:
        "results/b.txt"

rule a:
    output:
        temp("results/a.txt")
    shell:
        "echo a "
        ">{output} "
        "&& sleep 10 "

rule b:
    input:
        rules.a.output
    output:
        "results/b.txt"
    shell:
        "echo b "
        ">{output} "

Run completely standard (using the default 'ikim' profile):

$ snakemake
Using profile ikim for setting default command line arguments.
Assuming unrestricted shared filesystem usage.
...

The output is:

$ tree results/
results/
├── a.txt
└── b.txt

However, the output should be:

$ tree results/
results/
└── b.txt

Tested on:

$ python --version
Python 3.12.6

$ snakemake --version
8.20.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions