From 089f6e0be5b5074942264ad54a5f456db902aef8 Mon Sep 17 00:00:00 2001 From: delta-cloud-208e Date: Sun, 8 Mar 2026 10:59:45 +0000 Subject: [PATCH] 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 --- codex/ucodex_install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/codex/ucodex_install.sh b/codex/ucodex_install.sh index 020995d..01c476f 100755 --- a/codex/ucodex_install.sh +++ b/codex/ucodex_install.sh @@ -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}"