Clic on donate crashes lazydocker
Describe the bug
Clic on donate crashes lazydocker on Debian 10 server (probably when xdg-open is not installed)
errors.errorString sh: 1: xdg-open: not found
To Reproduce
- Launch lazydocker from a server (debian 10)
- Click on 'donate'
- See error
Expected behaviour if xdg-open is not installed, just print the donation url
Desktop (please complete the following information):
- OS: Debian 10 server x86_64
- Lazydocker Version: 0.8
- Date: 2020-02-02T00:22:48Z
- BuildSource: binaryRelease
- Commit: cea67bc570daaa757a886813ff3c2763189efef6
Additional context
*errors.errorString sh: 1: xdg-open: not found
/home/circleci/project/pkg/commands/os.go:120 (0x87acd8)
/home/circleci/project/pkg/commands/os.go:62 (0x87a3a3)
/home/circleci/project/pkg/commands/os.go:87 (0x87b081)
/home/circleci/project/pkg/commands/os.go:87 (0x87b066)
/home/circleci/project/pkg/gui/gui.go:343 (0x8879d0)
/home/circleci/project/vendor/github.com/jesseduffield/gocui/gui.go:834 (0x864e3d)
/home/circleci/project/vendor/github.com/jesseduffield/gocui/gui.go:834 (0x864e1c)
/home/circleci/project/vendor/github.com/jesseduffield/gocui/gui.go:792 (0x864b4c)
/home/circleci/project/vendor/github.com/jesseduffield/gocui/gui.go:485 (0x863472)
/home/circleci/project/vendor/github.com/jesseduffield/gocui/gui.go:483 (0x86344a)
/home/circleci/project/pkg/gui/gui.go:303 (0x8876a7)
/home/circleci/project/pkg/gui/subprocess.go:20 (0x898b8f)
/home/circleci/project/pkg/app/app.go:54 (0x8ad653)
/home/circleci/project/pkg/app/app.go:54 (0x8ad646)
/usr/local/go/src/runtime/proc.go:200 (0x42d79c)
/usr/local/go/src/runtime/asm_amd64.s:1337 (0x4585b1)
I think this package on Debian will solve the problem: xdg-utils.
I doubt if we should look into fixing this because there aren't any other common tools like xdg-open on linux and xdg-open is installed by default on close to all linux distros and if not comes with almost all desktop environments.
This is true for a desktop environment but xdg-utils is not default on a server ! Xorg altogether is quite useless in a server where you don't need gui ...
Lazydocker at the opposite is really useful in a server set-up where you don't have a gui and would want to manage your docker services ! And the project could maybe benefit from just printing a link for donation when xdg-utils is not installed.
Well I don't know the effort which is required to implement it
Oke that's a good point, excuses for my rude response!
Just opening a popup with the link won't hurt the code base and for a server this is the only solution to opening links so this is probably something good to add.
Same issue for editing the config.
It uses xdg-open aswell.