From 0ad0328a503a95cb9f2a76b98fc38e8924c5e808 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Thu, 9 Jan 2025 18:18:25 -0500 Subject: [PATCH] Better error --- x/sysproxy/sysproxy_linux.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x/sysproxy/sysproxy_linux.go b/x/sysproxy/sysproxy_linux.go index 0c47e780..751fe7b4 100644 --- a/x/sysproxy/sysproxy_linux.go +++ b/x/sysproxy/sysproxy_linux.go @@ -97,11 +97,10 @@ func setProxySettings(p ProxyType, host string, port string) error { func gnomeSettingsSetString(settings, key, value string) error { err := exec.Command("gsettings", "set", settings, key, value).Run() - exitErr := &exec.ExitError{} - if errors.As(err, &exitErr) { - return fmt.Errorf("%w, stderr: %v", err, string(exitErr.Stderr)) + if err != nil { + return fmt.Errorf("gsettings command failed: %w", err) } - return err + return nil } func getWebProxy() (host string, port string, enabled bool, err error) {