From 33995701293c70eb57b76f4cbbb78cd55448e0d7 Mon Sep 17 00:00:00 2001 From: David Kay Date: Sat, 21 Mar 2026 12:29:56 -0500 Subject: [PATCH] fix: handle donate link error instead of crashing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clicking the donate link on a headless server (or anything without xdg-open/open) crashes lazydocker because the error from OpenLink bubbles up unhandled. now it shows an error panel instead, same pattern openFile already uses three lines below. tested by swapping OpenLinkCommand to xdg-open on macOS — error panel renders cleanly instead of crashing. fixes #437 --- pkg/gui/gui.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index e7b55463..e89c6fd1 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -423,7 +423,10 @@ func (gui *Gui) handleDonate(g *gocui.Gui, v *gocui.View) error { if cx > len(gui.Tr.Donate) { return nil } - return gui.OSCommand.OpenLink("https://github.com/sponsors/jesseduffield") + if err := gui.OSCommand.OpenLink("https://github.com/sponsors/jesseduffield"); err != nil { + return gui.createErrorPanel(err.Error()) + } + return nil } func (gui *Gui) editFile(filename string) error {