From ae3daa9bcf4fc363825aad9b77f5d3879aeeff70 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 9 Sep 2024 09:27:38 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=89=8D=E7=BD=AE=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/pipeline/src/core/executor.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/core/pipeline/src/core/executor.ts b/packages/core/pipeline/src/core/executor.ts index 4928dafa..110d8aed 100644 --- a/packages/core/pipeline/src/core/executor.ts +++ b/packages/core/pipeline/src/core/executor.ts @@ -217,11 +217,17 @@ export class Executor { if (item.component?.name === "pi-output-selector") { const contextKey = input[key]; if (contextKey != null) { + if (typeof contextKey !== "string") { + throw new Error(`步骤${step.title}的${item.title}属性必须为String类型,请重新配置该属性`); + } // "cert": "step.-BNFVPMKPu2O-i9NiOQxP.cert", const arr = contextKey.split("."); const id = arr[1]; const outputKey = arr[2]; input[key] = this.currentStatusMap.get(id)?.status?.output[outputKey] ?? this.lastStatusMap.get(id)?.status?.output[outputKey]; + if (input[key] == null) { + this.logger.warn(`${item.title}的配置未找到对应的输出值,请确认对应的前置任务是否存在或者是否执行正确`); + } } } });