diff --git a/crates/ui-egui/src/cli_link.rs b/crates/ui-egui/src/cli_link.rs index 286d94168..3400bc925 100644 --- a/crates/ui-egui/src/cli_link.rs +++ b/crates/ui-egui/src/cli_link.rs @@ -45,6 +45,7 @@ pub fn plan(slot: &Slot, cli: &Path) -> Plan { /// The folders a link goes in, best first. pub const DIRS: &[&str] = &["/opt/homebrew/bin", "/usr/local/bin"]; +#[cfg(unix)] fn slot(link: &Path) -> Slot { match std::fs::symlink_metadata(link) { Err(_) => Slot::Empty, @@ -155,6 +156,8 @@ mod tests { assert_eq!(plan(&Slot::Other, cli), Plan::Skip); } + // `link_in` only makes links on Unix, and the test makes its own with `std::os::unix`. + #[cfg(unix)] #[test] fn links_only_where_it_may() { let d = std::env::temp_dir().join(format!("solidcraft-cli-link-{}", std::process::id()));