From 0a5df68534e48ca59669a2b5de03c771bbcc19a0 Mon Sep 17 00:00:00 2001 From: Aaron Liang <76561968+AaronL725@users.noreply.github.com> Date: Tue, 14 Jul 2026 19:12:12 +0800 Subject: [PATCH] fix: escape generated Cloud Mail newline before retry --- .github/workflows/temp-cloudmail-upgrade.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/temp-cloudmail-upgrade.yml b/.github/workflows/temp-cloudmail-upgrade.yml index f3715d4..60d7e5c 100644 --- a/.github/workflows/temp-cloudmail-upgrade.yml +++ b/.github/workflows/temp-cloudmail-upgrade.yml @@ -21,6 +21,22 @@ jobs: ref: main fetch-depth: 0 + - name: Fix Cloud Mail patch generator escaping + shell: bash + run: | + python <<'PY' + from pathlib import Path + + path = Path("tools/apply_cloudmail_upgrade.py") + text = path.read_text(encoding="utf-8") + old = ' combined = "\\n".join(parts)' + new = ' combined = "\\\\n".join(parts)' + count = text.count(old) + if count != 1: + raise RuntimeError(f"newline escape fix: expected exactly one match, found {count}") + path.write_text(text.replace(old, new, 1), encoding="utf-8") + PY + - name: Apply Cloud Mail provider patch run: python tools/apply_cloudmail_upgrade.py