File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 3939 id : linux_cli
4040 run : |
4141 set -euo pipefail
42- CLI_BIN="$(find node_modules/@openai -type f -path "*/@openai/codex-linux-*/vendor/*/path/codex" | head -n 1)"
42+ find_cli_bin() {
43+ find node_modules/@openai -type f -name codex \
44+ | grep -E '/@openai/codex-linux-[^/]+/vendor/.+/(codex/codex|path/codex)$' \
45+ | head -n 1 || true
46+ }
47+
48+ CLI_BIN="$(find_cli_bin)"
49+
50+ if [[ -z "${CLI_BIN}" ]]; then
51+ ARCH="$(uname -m)"
52+ if [[ "${ARCH}" == "x86_64" ]]; then
53+ npm install --no-save "@openai/codex-linux-x64@npm:@openai/codex@0.112.0-linux-x64"
54+ elif [[ "${ARCH}" == "aarch64" || "${ARCH}" == "arm64" ]]; then
55+ npm install --no-save "@openai/codex-linux-arm64@npm:@openai/codex@0.112.0-linux-arm64"
56+ else
57+ echo "Unsupported Linux arch for Codex CLI payload: ${ARCH}" >&2
58+ exit 1
59+ fi
60+ CLI_BIN="$(find_cli_bin)"
61+ fi
62+
4363 if [[ -z "${CLI_BIN}" ]]; then
4464 echo "Could not locate Linux codex binary under node_modules/@openai." >&2
4565 exit 1
You can’t perform that action at this time.
0 commit comments