Skip to content

Commit

Permalink
Handle absolute sources path read from the lockfile
Browse files Browse the repository at this point in the history
* Addressing the inconsistency with the absolute source paths introduced in conda#175 and noticed in conda#229.
  • Loading branch information
riccardoporreca committed Aug 10, 2022
1 parent fb3f298 commit 12e1e1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion conda_lock/conda_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down

0 comments on commit 12e1e1c

Please sign in to comment.