fix: 解决替换根目录失败的问题 (#4420)

pull/4424/head
ssongliu 2024-04-07 23:21:15 +08:00 committed by GitHub
parent 7c9608727d
commit 9b88979b69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ func (u *UpgradeService) Upgrade(req dto.Upgrade) error {
u.handleRollback(originalDir, 2)
return
}
if _, err := cmd.Execf("sed -i -e 's#BASE_DIR=.*#BASE_DIR=%s#g' /usr/local/bin", global.CONF.System.BaseDir); err != nil {
if _, err := cmd.Execf("sed -i -e 's#BASE_DIR=.*#BASE_DIR=%s#g' /usr/local/bin/1pctl", global.CONF.System.BaseDir); err != nil {
global.LOG.Errorf("upgrade basedir in 1pctl failed, err: %v", err)
u.handleRollback(originalDir, 2)
return