hykilpikonna / hyfetch

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

[F] Do not read debian_version on Ubuntu #195

Closed BKasin closed 9 months ago

BKasin commented 9 months ago

Description

Fix the issue I introduced in #191 that caused Ubuntu to read the debian_version file.

BKasin commented 9 months ago

Oh I'm silly, one sec.

hykilpikonna commented 7 months ago

Hmm ok this problem seems to be more complex, since we need to check the distro in a function that tries to obtain the distro to begin with. In this line, $distro_shorthand is either "on", "tiny", or "*", and $distro is not assigned yet.

so I used $(lsb_release -si) to check for the distro instead.

if [[ -f /etc/debian_version ]] && [[ $(lsb_release -si) != *"buntu"* ]]; then
image
hykilpikonna commented 7 months ago

Also, would it be better to check if the distro is Debian instead of if the distro isn't Ubuntu here?

BKasin commented 7 months ago

I'm trying to remember my reasoning for checking that it's not Ubuntu vs checking that it's specifically Debian, and can't come up with anything at the moment. I think it would be better to check if it's specifically Debian.