From 3c221cf804178f82c4998f95d7949581ebe94b2b Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 21 Mar 2022 11:33:14 +0100 Subject: [PATCH] Replaced pathlib relative_to with os.relpath relative_to does not resolve parent paths causing issues when a conda environment in another directory above the cwd in #1496 --- snakemake/deployment/conda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snakemake/deployment/conda.py b/snakemake/deployment/conda.py index 6f1a1b7a87..44d714b616 100644 --- a/snakemake/deployment/conda.py +++ b/snakemake/deployment/conda.py @@ -306,7 +306,7 @@ def execute_deployment_script(self, env_file, deploy_file): ) logger.info( "Running post-deploy script {}...".format( - Path(deploy_file).relative_to(os.getcwd()) + os.path.relpath(path = deploy_file, start = os.getcwd()) ) ) conda = Conda(self._container_img)