From 8e7be857209027e5b33fbdd7d4e900289ad68048 Mon Sep 17 00:00:00 2001 From: ssw Date: Thu, 2 Jul 2026 13:46:57 +0800 Subject: [PATCH] =?UTF-8?q?v0.15-1=20=E4=BA=8C=E6=AC=A1=E4=BF=AE=E5=A4=8D:?= =?UTF-8?q?=20print/update=20validatePrintCreate=20=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86=20(2026-07-02)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit validatePrintCreate 返回 {ok, steps: StepValidation[]}, 不是 {ok, errors} 修复: 遍历 steps 收集所有错误 (跟 form/workflow update 一致) --- src/commands/print/update.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/print/update.ts b/src/commands/print/update.ts index 417a160..97df7c8 100644 --- a/src/commands/print/update.ts +++ b/src/commands/print/update.ts @@ -96,7 +96,10 @@ export function buildPrintUpdateCommand(): Command { if (Object.keys(toValidate).length > 0) { const v = validatePrintCreate(toValidate as Parameters[0]) if (!v.ok) { - for (const err of v.errors) log.error(` ${err.message}`) + // 遍历所有 step 收集错误 + for (const step of v.steps) { + for (const err of step.errors) log.error(` [${step.stepName}] ${err.message}`) + } process.exit(1) } }