romkatv / romkatv/gitstatus

my terminal of mac appears some warn bellow

Open
#434 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.8k
Forks
134
Avg merge
2d 18h
Merged PRs (30d)
1

Description

ERROR]: gitstatus failed to initialize.

Your Git prompt may disappear or become slow.

The content of /private/var/folders/m7/8c975pws3nl32tbmf5pnkbw00000gq/T/gitstatus.POWERLEVEL9K.503.35972.1715675127.2.xtrace.log (gitstatus_start xtrace):

+(anon):7> setopt monitor
+(anon):9> ((  ! _GITSTATUS_STATE_POWERLEVEL9K  ))
+(anon):10> [[ -r /proc/version ]]
+(anon):13> print -rn
+(anon):14> zsystem flock -f lock_fd /private/var/folders/m7/8c975pws3nl32tbmf5pnkbw00000gq/T/gitstatus.POWERLEVEL9K.503.35972.1715675127.2.lock
+(anon):15> [[ 16 == <1-> ]]
+(anon):17> typeset -gi '_GITSTATUS_LOCK_FD_POWERLEVEL9K=lock_fd'
+(anon):20> '(anon)' /dev/fd/18
+(anon):1> typeset -gi 'GITSTATUS_DAEMON_PID_POWERLEVEL9K=36111'
+(anon):2> sysopen -r -o cloexec -u resp_fd -- /dev/fd/18
+(anon):3> [[ 20 == <1-> ]]
+(anon):4> typeset -gi '_GITSTATUS_RESP_FD_POWERLEVEL9K=resp_fd'
+(anon):121> typeset -gi '_GITSTATUS_STATE_POWERLEVEL9K=1'
+(anon):124> ((  ! async  ))
+(anon):125> ((  _GITSTATUS_CLIENT_PID_POWERLEVEL9K == sysparams[pid]  ))
+(anon):127> local pgid
+(anon):128> ((  0 < 20  ))
+(anon):129> [[ -t 20 ]]
+(anon):130> sysread -s 20 -t 5.0000000000 -i 20 'pgid[$#pgid+1]'
+(anon):130> return
                     ^ this command failed (5)

The content of /private/var/folders/m7/8c975pws3nl32tbmf5pnkbw00000gq/T/gitstatus.POWERLEVEL9K.503.35972.1715675127.2.daemon.log (gitstatus daemon log):

+(anon):22> local pgid=36111
+(anon):23> [[ 36111 == <1-> ]]
+(anon):105> ((  lock_fd == -1  ))
+(anon):27> trap '' PIPE
+(anon):29> [[ -z '' ]]
+(anon):30> local kernel
+(anon):108> zsystem flock -- /private/var/folders/m7/8c975pws3nl32tbmf5pnkbw00000gq/T/gitstatus.POWERLEVEL9K.503.35972.1715675127.2.lock
+(anon):31> kernel=+(anon):31> uname -s
+(anon):31> kernel=darwin
+(anon):32> [[ -n darwin ]]
+(anon):35> [[ '' == /* ]]
+(anon):37> ((  0  ))
+(anon):39> [[ -n '' ]]
+(anon):42> local -aU os=( darwin )
+(anon):43> case darwin (linux)
+(anon):43> case darwin (cygwin_nt-*)
+(anon):43> case darwin (msys_nt-*)
+(anon):43> case darwin (mingw32_nt-*)
+(anon):43> case darwin (mingw64_nt-*)
+(anon):53> local arch
+(anon):54> arch=+(anon):54> uname -m
+(anon):54> arch=arm64
+(anon):55> [[ -n arm64 ]]
+(anon):56> local daemons=( /Users/sunzhangfei/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/usrbin/gitstatusd-darwin-arm64 /Users/sunzhangfei/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/usrbin/gitstatusd-darwin-arm64-static /Users/sunzhangfei/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/bin/gitstatusd-darwin-arm64 /Users/sunzhangfei/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/bin/gitstatusd-darwin-arm64-static )
+(anon):60> local files=( )
+(anon):61> daemons=( )
+(anon):63> ((  stderr_fd && 0 != 0  ))
+(anon):73> ((  0  ))
+(anon):73> return
+(anon):100> local -i ret=1
+(anon):101> kill -- -36111

Your system information:

zsh:      5.9
uname -a: Darwin zybdeMacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:45:48 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T8122 arm64

If you need help, open an issue and attach this whole error message to it:

https://github.com/romkatv/gitstatus/issues/new

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the gitstatus initialization trace and daemon log, especially the Darwin arm64 paths under gitstatus/usrbin and gitstatus/bin. Check why no daemon candidates are found for the reported zsh 5.9 and Darwin arm64 environment. Done means gitstatus initializes without the warning and the Git prompt remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos, zsh
Domain
cli, operating-systems, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.