From 32c714d1b6e68c71a74a7452115040c87ac4bfdc Mon Sep 17 00:00:00 2001 From: xinghejd <31512683+xinghejd@users.noreply.github.com> Date: Tue, 15 Apr 2025 07:25:12 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=85=BE=E8=AE=AF?= =?UTF-8?q?=E4=BA=91=E9=83=A8=E7=BD=B2=E5=88=B0=E4=BB=BB=E6=84=8F=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=8F=92=E4=BB=B6=EF=BC=8C=E6=97=A0=E6=B3=95=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=B9=8B=E5=89=8D=E5=B7=B2=E4=B8=8A=E4=BC=A0=E7=9A=84?= =?UTF-8?q?=E8=85=BE=E8=AE=AF=E4=BA=91=E8=AF=81=E4=B9=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/plugin-tencent/plugin/deploy-to-all/index.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/deploy-to-all/index.ts b/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/deploy-to-all/index.ts index 263de102..5a63ef60 100644 --- a/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/deploy-to-all/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/deploy-to-all/index.ts @@ -128,11 +128,12 @@ export class DeployCertToTencentAll extends AbstractTaskPlugin { }); let certId:string = null - if (typeof certId === 'object') { - //上传 - certId = await this.uploadToTencent(access,this.tencentCertId as CertInfo); + if (typeof this.tencentCertId === 'string') { + certId = this.tencentCertId; + } else if (this.tencentCertId && typeof this.tencentCertId === 'object') { + certId = await this.uploadToTencent(access, this.tencentCertId); } else { - certId = this.tencentCertId as string; + throw new Error('无效的证书输入类型'); } const params = {