Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions marimo/_config/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
def infer_package_manager() -> PackageManagerKind:
"""Infer the package manager from the current project."""

# `uv run` sets `UV` to the uv executable path
# https://github.com/astral-sh/uv/issues/8775
if os.environ.get("UV") is not None:
return "uv"

try:
# Get the project root by looking for common project files
current_dir = Path.cwd()
Expand Down
2 changes: 2 additions & 0 deletions tests/_config/test_config_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def test_infer_package_manager_from_lockfile(mock_cwd: Path):
({"pixi.toml": ""}, {}, {}, "pixi"),
# Test fallback to pip
({}, {}, {}, "pip"),
# Test fallback to uv when running inside `uv run` / `uvx`
({}, {"UV": "/usr/bin/uv"}, {}, "uv"),
]

if sys.platform != "win32":
Expand Down
Loading