Skip to content

Commit

Permalink
Handle both Windows and Posix absolute sources path from the lockfile (
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Feb 4, 2023
1 parent 5cb6ccc commit f558cba
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 @@ -1057,7 +1057,9 @@ def run_lock(
# reconstruct native paths
locked_environment_files = [
pathlib.Path(p)
if pathlib.Path(p).is_absolute
# absolute paths could be locked for both flavours
if pathlib.PurePosixPath(p).is_absolute()
or pathlib.PureWindowsPath(p).is_absolute()
else pathlib.Path(
pathlib.PurePosixPath(lockfile_path).parent
/ pathlib.PurePosixPath(p)
Expand Down

0 comments on commit f558cba

Please sign in to comment.