fix(codex): create wrapper before patcher runs
Patcher uses `which codex` to find binary. After migrating codex -> .codex-bin, wrapper must exist before Step 2 (patcher) or patcher fails with "Codex CLI not found". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,17 @@ else
|
||||
log "Binary installed: $OLD_VER -> $NEW_VER"
|
||||
fi
|
||||
|
||||
# Create temporary wrapper so patcher can find codex via `which codex`
|
||||
if [ -f "$CODEX_BIN" ] && { [ ! -f "$CODEX_WRAPPER" ] || file "$CODEX_WRAPPER" | grep -q "ELF"; }; then
|
||||
cat > "$CODEX_WRAPPER" << 'TWEOF'
|
||||
#!/usr/bin/env bash
|
||||
exec /usr/local/bin/.codex-bin "$@"
|
||||
TWEOF
|
||||
chmod +x "$CODEX_WRAPPER"
|
||||
hash -r 2>/dev/null || true
|
||||
info "Temporary wrapper created"
|
||||
fi
|
||||
|
||||
# ---- Step 2: Download and apply patches ----
|
||||
|
||||
echo -e "\n${BOLD}Step 2: Applying config patches...${NC}"
|
||||
|
||||
Reference in New Issue
Block a user