fix(linter): global variables should always check the builtin variables (#4209)

This fixes commit dbbb6fca56.

Closes #3374
This commit is contained in:
Jelle van der Waa 2024-07-11 19:22:34 +02:00 committed by GitHub
parent 91dc0f7866
commit dd07a5475b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -137,7 +137,7 @@ impl<'a> LintContext<'a> {
}
pub fn env_contains_var(&self, var: &str) -> bool {
if GLOBALS["builtin"].contains_key("var") {
if GLOBALS["builtin"].contains_key(var) {
return true;
}
for env in self.env().iter() {