From 72d019cb4834ad97534c5c103d9496326cf09c37 Mon Sep 17 00:00:00 2001 From: stffabi Date: Wed, 22 Jun 2022 12:50:45 +0200 Subject: [PATCH] [v2, windows] Pass the correct installationStatus to the webview installation strategy (#1483) Co-authored-by: Lea Anthony --- v2/internal/wv2installer/wv2installer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v2/internal/wv2installer/wv2installer.go b/v2/internal/wv2installer/wv2installer.go index d31a7a80..41e2beaa 100644 --- a/v2/internal/wv2installer/wv2installer.go +++ b/v2/internal/wv2installer/wv2installer.go @@ -15,22 +15,22 @@ type installationStatus int const ( needsInstalling installationStatus = iota needsUpdating - installed ) func Process(appoptions *options.App) (string, error) { - messages := windows.DefaultMessages() if appoptions.Windows != nil && appoptions.Windows.Messages != nil { messages = appoptions.Windows.Messages } + installStatus := needsInstalling installedVersion, err := webviewloader.GetInstalledVersion() if err != nil { return "", err } + if installedVersion != "" { - installStatus = installed + installStatus = needsUpdating compareResult, err := webviewloader.CompareBrowserVersions(installedVersion, MinimumRuntimeVersion) if err != nil { return "", err @@ -40,7 +40,7 @@ func Process(appoptions *options.App) (string, error) { if !updateRequired { return installedVersion, nil } - } + return installedVersion, doInstallationStrategy(installStatus, messages) }