mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix(ci): support legacy Claude Code package layout in image build
Handle Claude Code package versions that do not ship install.cjs by conditionally running the installer script only when present, so pinned-version image builds work for both legacy and newer package layouts. Made-with: Cursor
This commit is contained in:
parent
c79ff50563
commit
07e599c8ca
1 changed files with 6 additions and 1 deletions
|
|
@ -22,7 +22,12 @@ RUN apk add --no-cache \
|
|||
echo "Installing @anthropic-ai/claude-code@${CLAUDE_CODE_RESOLVED_VERSION}" && \
|
||||
npm install -g --ignore-scripts "@anthropic-ai/claude-code@${CLAUDE_CODE_RESOLVED_VERSION}" && \
|
||||
CLAUDE_CODE_GLOBAL_ROOT="$(npm root -g)" && \
|
||||
node "${CLAUDE_CODE_GLOBAL_ROOT}/@anthropic-ai/claude-code/install.cjs" && \
|
||||
if [ -f "${CLAUDE_CODE_GLOBAL_ROOT}/@anthropic-ai/claude-code/install.cjs" ]; then \
|
||||
node "${CLAUDE_CODE_GLOBAL_ROOT}/@anthropic-ai/claude-code/install.cjs"; \
|
||||
else \
|
||||
echo "No install.cjs found for @anthropic-ai/claude-code@${CLAUDE_CODE_RESOLVED_VERSION}; using legacy CLI layout."; \
|
||||
fi && \
|
||||
command -v claude >/dev/null && \
|
||||
npm cache clean --force && \
|
||||
groupadd --system claude && \
|
||||
useradd --system --create-home --gid claude --shell /bin/bash claude && \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue