Skip to content

livery.workshop._uv

livery.workshop._uv

The one way the workshop runs uv.

Every uv invocation goes through livery.workshop._uv.run_uv, so capture, the working directory, and the failure shape cannot drift between call sites: a failure is uv's own words, raised through footman's fail.

Functions:

Name Description
run_uv

Run uv *args at root; a failure carries uv's own words.

run_uv

run_uv(*args: str, root: Path) -> None

Run uv *args at root; a failure carries uv's own words.

Source code in packages/workshop/src/livery/workshop/_uv.py
def run_uv(*args: str, root: Path) -> None:
    """Run ``uv *args`` at *root*; a failure carries uv's own words."""
    result = tools.uv.opts(cwd=root, nofail=True, recorded=False)(*args)
    if result.code != 0:
        fail(
            f"uv {' '.join(args)} exited {result.code}:\n{result.stdout}{result.stderr}"
        )