Skip to content

Commit 075893b

Browse files
authored
Still do conda run for uv (#218)
1 parent df93df8 commit 075893b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

unidep/_cli.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,14 @@ def _pip_install_local(
860860
flags: list[str] | None = None,
861861
) -> None: # pragma: no cover
862862
if _use_uv(no_uv):
863-
pip_command = ["uv", "pip", "install", "--python", python_executable]
863+
pip_command = [
864+
*conda_run,
865+
"uv",
866+
"pip",
867+
"install",
868+
"--python",
869+
python_executable,
870+
]
864871
else:
865872
pip_command = [*conda_run, python_executable, "-m", "pip", "install"]
866873

@@ -975,8 +982,10 @@ def _install_command( # noqa: PLR0912, PLR0915
975982
conda_env_prefix,
976983
)
977984
if env_spec.pip and not skip_pip:
985+
conda_run = _maybe_conda_run(conda_executable, conda_env_name, conda_env_prefix)
978986
if _use_uv(no_uv):
979987
pip_command = [
988+
*conda_run,
980989
"uv",
981990
"pip",
982991
"install",
@@ -985,11 +994,6 @@ def _install_command( # noqa: PLR0912, PLR0915
985994
*env_spec.pip,
986995
]
987996
else:
988-
conda_run = _maybe_conda_run(
989-
conda_executable,
990-
conda_env_name,
991-
conda_env_prefix,
992-
)
993997
pip_command = [
994998
*conda_run,
995999
python_executable,

0 commit comments

Comments
 (0)