hykilpikonna / hyfetch

🏳️‍🌈 🏳️‍⚧️ Neofetch with LGBTQ+ pride flags!
MIT License
1.15k stars 90 forks source link

[compatibility] Windows Terminal: UI broken on first run with older versions of Git #226

Open slackingfred opened 6 months ago

slackingfred commented 6 months ago

Describe the bug

Display of configuration options on first run (i.e. when %USERPROFILE%.config\hyfetch.json is not present) is totally corrupt.

Related: #41. That issue was fixed at the time, but I'm sure the display has became corrupt again by as early as Sep 2023.

Expected behavior

Usable configuration screens like that in Linux (the following screenshots are taken from a SSH session to a Ubuntu 22.04 machine):

屏幕截图 2024-01-06 095805

屏幕截图 2024-01-06 095836

Screenshots

System information:

What I am seeing when running HyFetch 1.4.11 or master:

屏幕截图 2024-01-06 094243

屏幕截图 2024-01-06 100910

Config file

None (first run)

Additional context

HyFetch runs okay after creating a default config file by pressing Enter for each question.

hykilpikonna commented 5 months ago

Do you have git bash installed? Can you show me the output of the following command?

python -c "from hyfetch import neofetch_util; print(neofetch_util.ensure_git_bash())"

This should return the bash backend that's used to call neofetch. (which returns git bash C:\Program Files\Git\bin\bash.exe for me)

Without further details, I can't seem to replicate this issue on my installation of Windows 11.

image
slackingfred commented 5 months ago

Yes, I have Git Bash (included in Git for Windows) installed -- but it is a pretty old version (installed in 2020 and never updated). Would that be the crux?

PS C:\Users\bspub> python3.8 -c "from hyfetch import neofetch_util; print(neofetch_util.ensure_git_bash())"
C:\Program Files\Git\bin\bash.exe
PS C:\Users\bspub> git --version
git version 2.28.0.windows.1
hykilpikonna commented 5 months ago

I just tried downgrading to Git 2.28, and yes the problem exists. I'll bisect to the exact version if I have time but yes the solution seems to be just install the latest Git.

image