fix: Improve command resolution in deploy and sync processes, adding warnings for missing tools

This commit is contained in:
2026-02-22 23:36:51 -08:00
parent d52d8829ba
commit 73e4a2ba00
2 changed files with 53 additions and 14 deletions

View File

@@ -175,8 +175,13 @@ def _build_run_cmd(run: object, env: dict[str, str]) -> list[str]:
"""Build a run command list from a RunSpec."""
match run.runner:
case "python_uv_tool":
uv = shutil.which("uv") or "uv"
cmd = [uv, "run", run.tool]
resolved = shutil.which(run.tool)
if not resolved:
print(
f" Warning: '{run.tool}' not on PATH. "
f"Install with: uv tool install --editable <source>"
)
cmd = [resolved or run.tool]
if run.args:
cmd.extend(run.args)
return cmd