mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
fix: handle donate link error instead of crashing
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
This commit is contained in:
parent
2ebe3848d6
commit
3399570129
1 changed files with 4 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue