screenFetch icon indicating copy to clipboard operation
screenFetch copied to clipboard

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

Open Peter0x44 opened this issue 1 year ago • 0 comments

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)

Peter0x44 avatar Feb 03 '24 15:02 Peter0x44