romkatv / gitstatus

Git status for Bash and Zsh prompt
GNU General Public License v3.0
1.65k stars 101 forks source link

Gitstatus failed to initialize on powerlevel10k #390

Closed santostiago closed 1 year ago

santostiago commented 1 year ago

When trying to run puma-dev I get this exception:

[ERROR]: gitstatus failed to initialize.
Zsh log (/private/var/folders/7g/f8gnjc8521s1bzps1dgmhjfm0000gn/T/gitstatus.POWERLEVEL9K.501.13606.1684238048.1.xtrace.log):
  +(anon):7> setopt monitor
    (anon):setopt:7: can't change option: monitor
  +(anon):7> return

  System information:
     zsh:      5.9
     uname -a: Darwin M1 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 arm64
  If you need help, open an issue and attach this whole error message to it:
     https://github.com/romkatv/gitstatus/issues/new
 bash: line 27: exec: puma: not found

This used to work, and I think it stopped when I upgraded the macOS version. I searched the issues here and the suggestion was to update powerlevel10k, which I did. But nothing changed.

Any idea what might be the issue?

romkatv commented 1 year ago

gitstatus cannot work without a controlling terminal.

Edit:

This error is issued because you are attempting to load gitstatus in zsh without a controlling terminal: setopt:7: can't change option: monitor. The solution is to load gitstatus only in interactive zsh with a controlling terminal.

This error is unrelated: bash: line 27: exec: puma: not found. It's a good idea to verify that your command works if you disable gitstatus altogether.

santostiago commented 1 year ago

hi @romkatv Thank you for replying!

This error is issued because you are attempting to load gitstatus in zsh without a controlling terminal

I'm not sure what this means. What should I do and how can I troubleshoot it? :)

I'm not sure how I can run puma-dev without gitstatus. Is there a way I can disable it globally? (I'm running powerlevel10k).

romkatv commented 1 year ago

I don't use puma-dev, so I don't know why it starts an interactive zsh without a controlling terminal. Note that it's not just a problem that affects gitstatus. You really don't want to use an interactive shell without a controlling terminal.

santostiago commented 1 year ago

@romkatv I'll try to re-install puma-dev. I'll post it here even if it works. Thank you!

romkatv commented 1 year ago

Sure. I'd be extremely surprised if it worked. To solve this problem you'll need to figure out what puma-dev is doing.