diff --git a/Cargo.lock b/Cargo.lock index 2821dab891..1137853876 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ diff --git a/Cargo.toml b/Cargo.toml index ad2e886ad8..0b796573c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -129,7 +129,7 @@ proc-macro-error = { version = "1.0", default-features = false } proc-macro2 = "1.0" procfs = "0.16.0" pwd = "1.3" -quick-xml = "0.37.0" +quick-xml = "0.32.0" quickcheck = "1.0" quickcheck_macros = "1.0" quote = "1.0" diff --git a/crates/nu-path/src/pwd_per_drive.rs b/crates/nu-path/src/pwd_per_drive.rs index ef7f7acc17..e80437e034 100644 --- a/crates/nu-path/src/pwd_per_drive.rs +++ b/crates/nu-path/src/pwd_per_drive.rs @@ -341,7 +341,10 @@ pub mod pwd_per_drive_singleton { // Expand a relative path let expanded = expand_pwd_per_drive(Path::new("C:test")); + #[cfg(target_os = "windows")] assert_eq!(expanded, Some(PathBuf::from("C:\\Users\\Home\\test"))); + #[cfg(not(target_os = "windows"))] + assert_eq!(expanded, None); // Will NOT expand an absolute path let expanded = expand_pwd_per_drive(Path::new("C:\\absolute\\path")); @@ -353,6 +356,9 @@ pub mod pwd_per_drive_singleton { // Expand with no PWD set for the drive let expanded = expand_pwd_per_drive(Path::new("D:test")); + #[cfg(target_os = "windows")] assert_eq!(expanded, Some(PathBuf::from("D:\\test"))); + #[cfg(not(target_os = "windows"))] + assert_eq!(expanded, None); } }