From 12e1e1c4cbffdf8ade80189101e9e5b758ff2d8f Mon Sep 17 00:00:00 2001 From: Riccardo Porreca Date: Wed, 10 Aug 2022 12:01:34 +0200 Subject: [PATCH] Handle absolute sources path read from the lockfile * Addressing the inconsistency with the absolute source paths introduced in #175 and noticed in #229. --- conda_lock/conda_lock.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conda_lock/conda_lock.py b/conda_lock/conda_lock.py index e9a6987de..fc592924e 100644 --- a/conda_lock/conda_lock.py +++ b/conda_lock/conda_lock.py @@ -929,7 +929,9 @@ def run_lock( lock_content = parse_conda_lock_file(lockfile_path) # reconstruct native paths locked_environment_files = [ - pathlib.Path( + pathlib.Path(p) + if pathlib.Path(p).is_absolute + else pathlib.Path( pathlib.PurePosixPath(lockfile_path).parent / pathlib.PurePosixPath(p) )