From c64f1fdbf6a557bf59cbb0c5a0be5252e718ad14 Mon Sep 17 00:00:00 2001 From: Danny Kim Date: Thu, 9 Jul 2026 09:21:27 +0900 Subject: [PATCH] Filter ANSI characters --- action.yml | 2 +- scripts/run-codex.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 1dfaf47..eb21737 100644 --- a/action.yml +++ b/action.yml @@ -13,7 +13,7 @@ runs: shell: bash run: | apt-get update - apt-get install -y --no-install-recommends gettext-base jq + apt-get install -y --no-install-recommends gettext-base jq ansifilter npm install -g @openai/codex - name: Run Codex Bot diff --git a/scripts/run-codex.sh b/scripts/run-codex.sh index 95ff125..87f2a68 100644 --- a/scripts/run-codex.sh +++ b/scripts/run-codex.sh @@ -17,9 +17,11 @@ post_comment() { } if ! codex login status > /dev/null 2>&1; then - codex login --device-auth > "${OUTPUT_FILE}" 2>&1 & + LOGIN_FILE="$(mktemp)" + codex login --device-auth > "${LOGIN_FILE}" 2>&1 & LOGIN_PID="${!}" sleep 3 + ansifilter < "${LOGIN_FILE}" > "${OUTPUT_FILE}" post_comment wait "${LOGIN_PID}" exit 1