fix: 解决应用名称存在大写导致无法升级的问题 (#4987)

Refs https://github.com/1Panel-dev/1Panel/issues/4986
This commit is contained in:
zhengkunwang 2024-05-12 22:16:28 +08:00 committed by GitHub
parent 95bbf4ee52
commit 79c2ba2125
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -455,7 +455,7 @@ func upgradeInstall(installID uint, detailID uint, backup, pullImage bool) error
upErr error upErr error
backupFile string backupFile string
) )
global.LOG.Infof(i18n.GetMsgByKey("UpgradeAppStart")) global.LOG.Infof(i18n.GetMsgWithName("UpgradeAppStart", install.Name, nil))
if backup { if backup {
backupRecord, err := NewIBackupService().AppBackup(dto.CommonBackup{Name: install.App.Key, DetailName: install.Name}) backupRecord, err := NewIBackupService().AppBackup(dto.CommonBackup{Name: install.App.Key, DetailName: install.Name})
if err == nil { if err == nil {
@ -587,7 +587,8 @@ func upgradeInstall(installID uint, detailID uint, backup, pullImage bool) error
} }
if pullImage { if pullImage {
images, err := composeV2.GetDockerComposeImages(install.Name, content, []byte(detail.DockerCompose)) projectName := strings.ToLower(install.Name)
images, err := composeV2.GetDockerComposeImages(projectName, content, []byte(detail.DockerCompose))
if err != nil { if err != nil {
upErr = err upErr = err
return return