Open jeevithakannan2 opened 2 weeks ago
@jeevithakannan2 if there are any other scripts that use && with command_exists please remove all of the &&'s and make a pr
That suggestion is wrong.
how so?
You suggestion is interpreted as command_exists foo1 || command_exists foo2
nope
command_exists() {
for cmd in "$@"; do
export PATH="$HOME/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:$PATH"
command -v "$cmd" >/dev/null 2>&1 || return 1
done
return 0
}
take a look
This will not check both foo1 and foo2 .It will immediately return 1 if foo1 is not found
removing the && would simplify it since && is redundant due to #762 having both && and not having && is the same but, && is redundant due to #762
if one is found why would it need to check the others? - > i misunderstood
This will not check both foo1 and foo2 .It will immediately return 1 if foo1 is not found
removing the && would simplify it since && is redundant due to #762 having both && and not having && is the same but, && is redundant due to #762
That's what I have explained above. #762 will work as || not as &&
i have made a pr to fix this #931 , might as well change it now and reference it in the description of this one
im tripping lol
ig there really is no way to fix that other than manually using &&
Oops accidentally rebased instead of merging main. Will clear this in a minute
wtf
Fixed !!
Oops accidentally rebased instead of merging main. Will clear this in a minute
Rebasing is often preferred, just fyi
Too many merges make git log
way to complicated to understand/bisect if needed.
Type of Change
Description
Testing
Checklist