fix(litellm): put venv bin on PATH for prisma generate on macOS
`prisma generate` invokes the `prisma-client-py` generator as a `/bin/sh` subprocess, which is resolved via PATH. Even though the role calls the absolute venv `prisma` binary, the generator console script lives in the same venv bin dir that is not on the default command PATH, so generation failed with "prisma-client-py: command not found" on macOS. Add an `environment.PATH` that prepends the venv bin dir (plus Homebrew prefixes) so the generator subprocess resolves. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ce2070e779
commit
bbf5260f0d
@ -225,6 +225,13 @@
|
||||
cmd: "{{ litellm_prisma_binary_path }} generate"
|
||||
args:
|
||||
chdir: "{{ litellm_proxy_dir }}"
|
||||
# `prisma generate` shells out to the `prisma-client-py` generator, which is a
|
||||
# console script installed into the venv's bin dir. The default command PATH
|
||||
# does not include the venv, so the absolute prisma binary still fails with
|
||||
# "prisma-client-py: command not found". Put the venv bin dir on PATH so the
|
||||
# generator subprocess is resolvable.
|
||||
environment:
|
||||
PATH: "{{ litellm_venv_dir }}/bin:/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
|
||||
become: true
|
||||
become_user: "{{ litellm_service_user }}"
|
||||
changed_when: false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user