Skip to content

Commit d982129

Browse files
committed
Revert "fix: match passthough envs with uppercased env names (#25)"
This reverts commit 1f1c73b.
1 parent 3fb291a commit d982129

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

crates/vite_str/src/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ impl Str {
7171
pub fn push_str(&mut self, s: &str) {
7272
self.0.push_str(s);
7373
}
74-
75-
pub fn to_uppercase(&self) -> Self {
76-
Self(self.0.to_uppercase())
77-
}
78-
79-
pub fn to_lowercase(&self) -> Self {
80-
Self(self.0.to_lowercase())
81-
}
8274
}
8375

8476
impl AsRef<str> for Str {

crates/vite_task/src/execute.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ impl TaskEnvs {
265265
GlobPatternSet::new(task.config.envs.iter().filter(|s| !s.starts_with('!')))?;
266266
let sensitive_patterns = GlobPatternSet::new(SENSITIVE_PATTERNS)?;
267267
for (name, value) in &all_envs {
268-
let upper_name = name.to_uppercase();
269-
if !envs_without_pass_through_patterns.is_match(&upper_name) {
268+
if !envs_without_pass_through_patterns.is_match(name) {
270269
continue;
271270
}
272271
let Some(value) = value.to_str() else {
@@ -275,7 +274,7 @@ impl TaskEnvs {
275274
value: value.to_os_string(),
276275
});
277276
};
278-
let value: Str = if sensitive_patterns.is_match(&upper_name) {
277+
let value: Str = if sensitive_patterns.is_match(name) {
279278
let mut hasher = Sha256::new();
280279
hasher.update(value.as_bytes());
281280
format!("sha256:{:x}", hasher.finalize()).into()

0 commit comments

Comments
 (0)