Skip to content

Commit

Permalink
fix: detect uv bin in the new location
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Nov 8, 2024
1 parent ea39d36 commit 1a20587
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pdm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ def uv_cmd(self) -> list[str]:
else:
return [sys.executable, "-m", "uv"]
# Try to find it in the typical place:
if (uv_path := Path.home() / ".cargo/bin/uv").exists():
return [str(uv_path)]
for bin_dir in [".local/bin", ".cargo/bin"]:
if (uv_path := Path.home() / bin_dir / "uv").exists():
return [str(uv_path)]
# If not found, try to find it in PATH
import shutil

Expand Down

0 comments on commit 1a20587

Please sign in to comment.