jesseduffield / lazygit

simple terminal UI for git commands
MIT License
48k stars 1.72k forks source link

pressing 'o' makes lazygit hang #3539

Open DanViTrinh opened 2 months ago

DanViTrinh commented 2 months ago

Describe the bug When pressing 'o' to open a file lazygit hangs.

To Reproduce Steps to reproduce the behavior:

  1. Open lazygit
  2. press 'o' on a random file
  3. lazygit then hangs

Expected behavior The file gets opened with xdg-open

Screenshots

https://github.com/jesseduffield/lazygit/assets/80539964/92dd554d-6dad-470a-9d8c-71e65e367689

Running bash -c xdg-open "..." returns as follows and does not open anything. image

Screenshot from debug: image

Version info: Run lazygit --version and paste the result here commit=v0.41.0, build date=2024-03-23T09:30:36Z, build source=binaryRelease, version=0.41.0, os=linux, arch=amd64, git version=2.44.0 Run git --version and paste the result here git version 2.44.0

mark2185 commented 2 months ago

Are the files behind a symlink or are they symlinks themselves?

DanViTrinh commented 2 months ago

they are symlinks themselves.

mark2185 commented 2 months ago

And does bash -c "xdg-open /home/dan/.dotfiles/.config/lazygit/config.yml" work as expected? (note the quotes)

DanViTrinh commented 2 months ago

yes that works as expected

DanViTrinh commented 2 months ago

Are the files behind a symlink or are they symlinks themselves?

Opening a file that is not a symlink works, but lazygit crashes when it's a symlink.

mark2185 commented 2 months ago

Huh that's odd, I can open both regular files and symlinks without issues.

bbnolauv commented 4 weeks ago

same problem here.