is this too much voodoo?
All checks were successful
/ test-on-windows (push) Successful in 15s
/ test-on-alpine (push) Successful in 11s

This commit is contained in:
partisan 2025-03-02 10:14:22 +01:00
parent d17285d122
commit 58e18083a3
4 changed files with 141 additions and 14 deletions

View file

@ -1,3 +1,5 @@
//go:build !windows
package main
import (
@ -62,8 +64,8 @@ func (inst *Installer) StartDownloadDecompress() {
}
spm.UpdateProgress(0, "Downloading specified packages...")
if err := spm.AutoDownloadSpecified(specs); err != nil {
fmt.Println("AutoDownloadSpecifiedPackages failed:", err)
if err := spm.DownloadSpecified(specs); err != nil {
fmt.Println("DownloadSpecifiedPackages failed:", err)
inst.LastError = err
return
}
@ -93,7 +95,7 @@ func (inst *Installer) FinalInstall() {
inst.doFinalInstall()
}
// doFinalInstall does the actual installation by invoking AutoInstallUpdates.
// doFinalInstall does the actual installation by invoking InstallUpdates.
func (inst *Installer) doFinalInstall() {
inst.IsInstalling = true
inst.PendingInstall = false // we are fulfilling the install now
@ -105,14 +107,7 @@ func (inst *Installer) doFinalInstall() {
}()
spm.UpdateProgress(0, "Installing updates...")
if err := spm.AutoInstallUpdates(); err != nil {
inst.LastError = err
return
}
// Register the app in Windows (i.e. create registry entries)
spm.UpdateProgress(0, "Registering app...")
if err := spm.RegisterApp(); err != nil {
if err := spm.InstallUpdates(); err != nil {
inst.LastError = err
return
}