Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad conditions on if statements that were causing false DE detection #787

Closed
wants to merge 1 commit into from

Conversation

Peter0x44
Copy link

There are two instances of the condition:
if [ -n "$DE" ]; then

I think if statements with this condition were ALWAYS running, because at the beginning of detectde () $DE gets initialized to "Not Present".

if [[ -z "$DE" || "$DE" = "Not Present" ]]; then

There was one instance of this, which I believe is supposed to have a "==" vs "=". The first part of the condition is also NEVER false, since $DE gets initialized to "Not Present", as mentioned before, so I just removed it.

Fixes #782 (and possibly others)

There are two instances of the condition:
if [ -n "$DE" ]; then

I think if statements with this condition were ALWAYS running, because
at the beginning of detectde () $DE gets initialized to "Not Present".

if [[ -z "$DE" || "$DE" = "Not Present" ]]; then

There was one instance of this, which I believe is supposed to have a
"==" vs "=". The first part of the condition is also NEVER false, since
$DE gets initialized to "Not Present", as mentioned before, so I just
removed it.

Fixes KittyKatt#782 (and possibly others)
@Peter0x44
Copy link
Author

Peter0x44 commented May 14, 2024

I've stopped using screenfetch and won't be working on this any further.
If someone else wants to pick this up, please do.

@Peter0x44 Peter0x44 closed this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linux Mint 21.2 Cinnamon DE
1 participant