Skip to content

fix: handle donate link error gracefully on headless systems#782

Open
daresTheDevil wants to merge 1 commit into
jesseduffield:masterfrom
daresTheDevil:fix/donate-link-crash-437
Open

fix: handle donate link error gracefully on headless systems#782
daresTheDevil wants to merge 1 commit into
jesseduffield:masterfrom
daresTheDevil:fix/donate-link-crash-437

Conversation

@daresTheDevil
Copy link
Copy Markdown

@daresTheDevil daresTheDevil commented Mar 21, 2026

what's broken

clicking the donate link on a headless server crashes lazydocker. the system doesn't have xdg-open installed, OpenLink returns an error, and it bubbles up unhandled to gocui's event loop which treats it as fatal. been open for 3 years.

the fix

catch the error and show it in an error panel instead of crashing. this is the same pattern openFile already uses literally three lines below handleDonate in the same file, it was just missed here.

tested

simulated a headless environment by swapping OpenLinkCommand to xdg-open on macOS (where it doesn't exist). before the fix: crash. after: error panel renders cleanly with exec: "xdg-open": executable file not found in $PATH.

CleanShot 2026-03-21 at 12 29 19@2x

fixes #437

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 jesseduffield#437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Donate link crashes program when clicked on system without xdg-open

1 participant