mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	远程升级节点时,如果老的文件不存在,则不提示
This commit is contained in:
		@@ -5,6 +5,7 @@ import (
 | 
			
		||||
	"errors"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeAPI/internal/db/models"
 | 
			
		||||
	"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
 | 
			
		||||
	"os"
 | 
			
		||||
	"path/filepath"
 | 
			
		||||
	"regexp"
 | 
			
		||||
)
 | 
			
		||||
@@ -80,7 +81,7 @@ func (this *NodeInstaller) Install(dir string, params interface{}, installStatus
 | 
			
		||||
 | 
			
		||||
		// 删除可执行文件防止冲突
 | 
			
		||||
		err = this.client.Remove(exePath)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
		if err != nil && err != os.ErrNotExist {
 | 
			
		||||
			return errors.New("remove old file failed: " + err.Error())
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user