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 (zsh/powerlevel10k) #417

Closed Sandvich closed 6 months ago

Sandvich commented 6 months ago

Hi, getting this issue:

❯ GITSTATUS_LOG_LEVEL=DEBUG GITSTATUS_NUM_THREADS=20 GITSTATUS_DAEMON=/Users/sanchitsharma/powerlevel10k/gitstatus/bin/gitstatusd-darwin-arm64 gitstatus_start -s -1 -u -1 -d -1 -c -1 -m -1 -a POWERLEVEL9K
[ERROR]: gitstatus failed to initialize.

  Your git prompt may disappear or become slow.

  The content of /var/folders/jp/m0lvqf550pl1sn_fvwg9kgsm0000gn/T//gitstatus.27928.xtrace.1703688648.8023149967.3178 (gitstatus_start_impl xtrace):

    +gitstatus_start_impl:6> ((  daemon_pid == -1  ))
    +gitstatus_start_impl:7> local os
    +gitstatus_start_impl:8> local daemon=/Users/sanchitsharma/powerlevel10k/gitstatus/bin/gitstatusd-darwin-arm64
    +gitstatus_start_impl:9> [[ -n /Users/sanchitsharma/powerlevel10k/gitstatus/bin/gitstatusd-darwin-arm64 ]]
    +gitstatus_start_impl:16> [[ -x /Users/sanchitsharma/powerlevel10k/gitstatus/bin/gitstatusd-darwin-arm64 ]]
                               ^ this command failed

  Your system information:

    zsh:      5.9
    uname -a: Darwin 192.168.1.132 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64

I've seen a few similar issues reported but none of those fixes have worked. Pulled the latest code, removed and recloned the repo, checked for mentions of GITSTATUS in my zshrc/zprofile/profile... Nothing seems to work.

Sometimes my prompt has something like this: master ● ? ❯ and other times it has something more like this: master v0.37.6 ? ❯

Any ideas?

romkatv commented 6 months ago

You need to update powerlevel10k. You can do it by running this command:

git -C ~/powerlevel10k pull
Sandvich commented 6 months ago

I've already done that, I've got the latest.

romkatv commented 6 months ago

Try this:

rm ~/powerlevel10k/gitstatus/bin/gitstatusd-darwin-arm64
romkatv commented 6 months ago

If thar does not help, try this:

sudo rm -rf ~/powerlevel10k && git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
Sandvich commented 6 months ago

Ah, deleting and recloning fixed it, thanks ^^ Something must have gotten messed up with the repo.