Skip to content

Commit

Permalink
Include file name ("fn") in fake environment JSON files
Browse files Browse the repository at this point in the history
Should fix #452 with mamba>=1.4.6
  • Loading branch information
riccardoporreca committed Jul 9, 2023
1 parent 03c8539 commit e6e7eb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions conda_lock/conda_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ def fake_conda_environment(
channel = urlunsplit(
(url.scheme, url.hostname, str(path.parent), None, None)
)
file_name = path.name
while path.suffix in {".tar", ".bz2", ".gz", ".conda"}:
path = path.with_suffix("")
build = path.name.split("-")[-1]
Expand All @@ -577,6 +578,7 @@ def fake_conda_environment(
"build_number": build_number,
"version": dep.version,
"subdir": path.parent.name,
"fn": file_name,
"depends": [f"{k} {v}".strip() for k, v in dep.dependencies.items()],
}
# mamba requires these to be stringlike so null are not allowed here
Expand Down

0 comments on commit e6e7eb1

Please sign in to comment.