Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: convert conda env to string before checks (#1382)
  • Loading branch information
MSamman committed Feb 9, 2022
1 parent 595945a commit 7a8da9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions snakemake/workflow.py
Expand Up @@ -1484,6 +1484,9 @@ def decorate(ruleinfo):
rule=rule,
)

if isinstance(ruleinfo.conda_env, Path):
ruleinfo.conda_env = str(ruleinfo.conda_env)

if (
ruleinfo.conda_env is not None
and is_conda_env_file(ruleinfo.conda_env)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_conda/Snakefile
@@ -1,4 +1,5 @@
shell.executable("bash")
conda_env = Path("test-env.yaml")

rule all:
input:
Expand All @@ -19,6 +20,6 @@ rule b:
output:
"test{i}.out2"
conda:
"test-env.yaml"
conda_env
shell:
"Tm -h > {output} || true"

0 comments on commit 7a8da9f

Please sign in to comment.