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

A negative match on one test should not stop the rest #1

Closed
lilyball opened this issue Sep 11, 2021 · 1 comment
Closed

A negative match on one test should not stop the rest #1

lilyball opened this issue Sep 11, 2021 · 1 comment

Comments

@lilyball
Copy link

Right now, if one of the env vars tested exists but doesn’t pass the requisite test, it doesn’t check the rest. This can cause false negatives.

For example, if I launch kitty from Terminal.app. TERM_PROGRAM is set to Apple_Terminal (Kitty doesn’t set this var), but TERM is set to xterm-kitty. This crate will return false though as it checks TERM_PROGRAM first and doesn’t even look at TERM if it’s set.

More generally, the issue is this crate tests vars that are not guaranteed to be set by the terminal emulator, and therefore might have been inherited. This can cause false positives too, such as if a supporting terminal launches one that doesn’t support it but doesn’t set TERM_PROGRAM, but that’s less of an issue as hyperlinks degrade gracefully.

@zkat zkat closed this as completed in 3aa5ffb Sep 16, 2021
@zkat
Copy link
Owner

zkat commented Sep 16, 2021

Fixed :)

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

No branches or pull requests

2 participants