Skip to content

Commit 409ba35

Browse files
committed
fixes uutils#7763
clarifying the target_vendor and using FD0
1 parent a067b58 commit 409ba35

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/uu/tail/src/paths.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ impl Input {
7878
path.canonicalize().ok()
7979
}
8080
InputKind::File(_) | InputKind::Stdin => {
81-
if cfg!(unix) {
82-
match PathBuf::from(text::DEV_STDIN).canonicalize().ok() {
83-
Some(path) if path != PathBuf::from(text::FD0) => Some(path),
84-
Some(_) | None => None,
85-
}
86-
} else {
87-
None
81+
#[cfg(all(unix, not(target_vendor = "apple")))]
82+
{
83+
return PathBuf::from(text::FD0).canonicalize().ok();
84+
}
85+
#[cfg(any(not(unix), target_vendor = "apple"))]
86+
{
87+
return None;
8888
}
8989
}
9090
}

0 commit comments

Comments
 (0)