From 152cdc61775bb001c26e1a0e2f96ac9ce0fba8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 7 Oct 2026 11:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E8=BE=BE=E6=80=A7=20E2E=EF=BC=9A?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=B8=B8=E6=88=8F=E5=A4=B1=E8=B4=A5=E6=97=B6?= =?UTF-8?q?=E5=85=88=E9=80=80=E5=87=BA=E5=86=8D=E8=A7=A3=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E5=B0=81=E9=9D=A2=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 gameId 取值后补 if (!gameId) process.exit(1) - 创建失败时 created.data 为空,提前取 coverObjectKey 会抛未捕获 TypeError 打崩脚本 --- scripts/check-game-distribution-web-a11y-e2e.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/check-game-distribution-web-a11y-e2e.mjs b/scripts/check-game-distribution-web-a11y-e2e.mjs index 4615f67be..48ddad423 100644 --- a/scripts/check-game-distribution-web-a11y-e2e.mjs +++ b/scripts/check-game-distribution-web-a11y-e2e.mjs @@ -211,6 +211,9 @@ async function publishFixtureGame(adminToken, stamp, title) { formData: publishFormData(metadata, { cover }), }); const gameId = created.data?.id; + // 创建失败时 created.data 为空,下面解引用 coverObjectKey 会抛未捕获 TypeError 把脚本打崩, + // 拿不到成组的可达性 check 结论;先退出,保留一条正常的失败退出码。 + if (!gameId) process.exit(1); const version = await api(`/api/game-distribution/games/${gameId}/versions`, { method: 'POST', token: author,