From 66528aef263e5b362ef6418955a42730b057e500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=AF=E8=88=AA?= <101104760+ZhangSetSail@users.noreply.github.com> Date: Thu, 13 Jun 2024 18:18:00 +0800 Subject: [PATCH] fix: cmd is null (#1941) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com> --- worker/appm/conversion/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/appm/conversion/version.go b/worker/appm/conversion/version.go index 7d79ad354..f9b4f3913 100644 --- a/worker/appm/conversion/version.go +++ b/worker/appm/conversion/version.go @@ -283,10 +283,10 @@ func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error { func getMainContainer(as *v1.AppService, version *dbmodel.VersionInfo, dv *volume.Define, envs []corev1.EnvVar, envVarSecrets []*corev1.Secret, dbmanager db.Manager) (*corev1.Container, error) { cmd, err := createCMD(as, dbmanager) var containerCMD []string + containerCMD = []string{cmd} if cmd == "" { containerCMD = nil } - containerCMD = []string{cmd} if err != nil { return nil, fmt.Errorf("craete service account name failure: %v", err) }