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 authored and maresb committed Feb 25, 2023
1 parent 1bdb36d commit 1a87a6a
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 @@ -971,7 +971,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 1a87a6a

Please sign in to comment.