Skip to content

Commit 80123f4

Browse files
committed
fix(cli): gate ProfileEnvGuard behind cfg(not(windows)) to fix Windows CI
1 parent 0c21137 commit 80123f4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • crates/vite_global_cli/src/commands/env

crates/vite_global_cli/src/commands/env/doctor.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,12 +795,14 @@ mod tests {
795795
}
796796

797797
/// Guard for env vars used by profile file tests.
798+
#[cfg(not(windows))]
798799
struct ProfileEnvGuard {
799800
original_home: Option<std::ffi::OsString>,
800801
original_zdotdir: Option<std::ffi::OsString>,
801802
original_xdg_config: Option<std::ffi::OsString>,
802803
}
803804

805+
#[cfg(not(windows))]
804806
impl ProfileEnvGuard {
805807
fn new(
806808
home: &std::path::Path,
@@ -827,6 +829,7 @@ mod tests {
827829
}
828830
}
829831

832+
#[cfg(not(windows))]
830833
impl Drop for ProfileEnvGuard {
831834
fn drop(&mut self) {
832835
unsafe {

0 commit comments

Comments
 (0)