mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
Fix update on windows
This commit is contained in:
@ -310,7 +310,9 @@ func (u *Updates) StartUpgrade(currentStatus chan<- Progress) { // nolint[funlen
|
||||
status.UpdateDescription(InfoUpgrading)
|
||||
switch runtime.GOOS {
|
||||
case "windows": //nolint[goconst]
|
||||
installerFile := strings.Split(u.winInstallerFile, "/")[1]
|
||||
// Cannot use filepath.Base on windows it has different delimiter
|
||||
split := strings.Split(u.winInstallerFile, "/")
|
||||
installerFile := split[len(split)-1]
|
||||
cmd := exec.Command("./" + installerFile) // nolint[gosec]
|
||||
cmd.Dir = u.updateTempDir
|
||||
status.Err = cmd.Start()
|
||||
|
||||
Reference in New Issue
Block a user