Skip to content

Commit

Permalink
Better error
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Jan 9, 2025
1 parent e9306b3 commit 0ad0328
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions x/sysproxy/sysproxy_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0ad0328

Please sign in to comment.