From 203c0bb8171f1350fe37f11e7e102eae28efba8c Mon Sep 17 00:00:00 2001 From: Snshadow Date: Tue, 3 Dec 2024 17:41:33 +0900 Subject: [PATCH] fix: modified wrong err value --- pkg/edge/create_env_native.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/edge/create_env_native.go b/pkg/edge/create_env_native.go index e5b4c4f..ab8dd17 100644 --- a/pkg/edge/create_env_native.go +++ b/pkg/edge/create_env_native.go @@ -15,12 +15,12 @@ import ( func createCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder string, environmentCompletedHandle *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, additionalBrowserArgs string) error { browserPathPtr, err := windows.UTF16PtrFromString(browserExecutableFolder) if err != nil { - return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", browserExecutableFolder, nil) + return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", browserExecutableFolder, err) } userPathPtr, err := windows.UTF16PtrFromString(userDataFolder) if err != nil { - return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", userDataFolder, nil) + return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", userDataFolder, err) } hr, err := webviewloader.CreateCoreWebView2EnvironmentWithOptions( @@ -30,7 +30,7 @@ func createCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataF additionalBrowserArgs, ) if err != nil { - return fmt.Errorf("Error calling CreateCoreWebView2EnvironmentWithOptions: %v", nil) + return fmt.Errorf("Error calling CreateCoreWebView2EnvironmentWithOptions: %v", err) } if hr != 0 {