Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazygit hangs on any custom command #3937

Open
wojciech-kulik opened this issue Sep 24, 2024 · 6 comments
Open

Lazygit hangs on any custom command #3937

wojciech-kulik opened this issue Sep 24, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@wojciech-kulik
Copy link

wojciech-kulik commented Sep 24, 2024

Describe the bug
When I call any custom command using : it is stuck on "Press enter to return to lazygit" when I call it from Neovim. However, when I call it directly from the Terminal (kitty) like:

/some/repo
> lazygit

+ /bin/zsh -i -c git fetch origin develop

From github.com:some/repo
 * branch                develop    -> FETCH_HEAD
[1]  + 50708 suspended (tty output)  lazygit

> …/some/repo ✖ TTOU 7s
> fg                                                                                                                                                                                                                                                                                
[1]  + 50708 continued  lazygit

it's stuck, lazygit doesn't appear. I can't do anything, I have to kill the terminal.

Environment

> lazygit --version                                                                                                                                                                                                                                                                 
commit=, build date=, build source=nix, version=0.44.1, os=darwin, arch=arm64, git version=2.46.0
> git --version                                                                                                                                                                                                                                                                    
git version 2.46.0

Additional context

I'm using Nix and I noticed that lazygit calls wrong zsh instance. It should use the first one:

> where zsh                                        
/etc/profiles/per-user/me/zsh
/run/current-system/sw/bin/zsh
/bin/zsh

but it uses the last one. I'm not sure if it matters.

@wojciech-kulik wojciech-kulik added the bug Something isn't working label Sep 24, 2024
@stefanhaller
Copy link
Collaborator

This is a duplicate of #3903 (and #3923).

I'm using Nix and I noticed that lazygit calls wrong zsh instance. It should use the first one:
but it uses the last one. I'm not sure if it matters.

It probably doesn't matter for this issue, but just to explain this one: lazygit uses whatever your $SHELL environment variable is set to (and it seems to be /bin/zsh). It doesn't look for zsh in your PATH.

@wojciech-kulik
Copy link
Author

wojciech-kulik commented Sep 24, 2024

Thank you for details! I'm waiting for the fix then 🤞

@mayorbyrne
Copy link

Apologies if this is the same issue, but I'm running into almost exactly the same issue except my terminal (wezterm) is not freezing. Lazygit is simply being killed after running a custom command, and I have to reopen it.

+ /bin/zsh -i -c git pull

Already up to date.

Press enter to return to lazygit[3]  + 13839 suspended (tty input)  lazygit
~/Documents/myRepo $

@mark2185
Copy link
Collaborator

Apologies if this is the same issue, but I'm running into almost exactly the same issue except my terminal (wezterm) is not freezing. Lazygit is simply being killed after running a custom command, and I have to reopen it.

It gets suspended, not killed, you can bring it up with fg.

But yes, same issue.

@wojciech-kulik
Copy link
Author

wojciech-kulik commented Sep 24, 2024

Based on your logs it’s suspended. What happens if you run fg after that? In my case it’s not going back to lazygit but it’s freezed

@mayorbyrne
Copy link

mayorbyrne commented Sep 25, 2024

ah, yes. Confirmed that running fg afterwards results in [1] + 4381 continued lazygit with a hanging blinking cursor.

that said, if I run exit then, it does go back to lazygit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants