mirror of
https://github.com/hwchase17/langchain.git
synced 2026-03-18 02:53:16 +00:00
fix(model-profiles): use posix-compatible substitution in makefile (#35957)
The `refresh_model_profiles` CI workflow has been failing daily since
the `refresh-profiles` Makefile target was added. `make` runs recipes
with `/bin/sh`, which is dash on Ubuntu CI runners — and
`${var//pattern/replacement}` is a bash-only construct that dash rejects
with `Bad substitution`.
## Changes
- Replace bash-ism `$${partner//-/_}` with POSIX-compatible `$$(echo
"$${partner}" | tr '-' '_')` in the `refresh-profiles` target's
`data_dir` construction
This commit is contained in:
@@ -30,7 +30,7 @@ refresh-profiles:
|
||||
@for entry in $(PROFILE_PROVIDERS); do \
|
||||
partner=$${entry%%=*}; \
|
||||
provider=$${entry##*=}; \
|
||||
data_dir="../partners/$${partner}/langchain_$${partner//-/_}/data"; \
|
||||
data_dir="../partners/$${partner}/langchain_$$(echo "$${partner}" | tr '-' '_')/data"; \
|
||||
echo "--- Refreshing $${partner} (provider: $${provider}) ---"; \
|
||||
echo y | UV_FROZEN=false uv run langchain-profiles refresh \
|
||||
--provider "$${provider}" \
|
||||
|
||||
Reference in New Issue
Block a user