fix: Improve command resolution in deploy and sync processes, adding warnings for missing tools
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user