diff --git a/src/uu/tail/src/error.rs b/src/uu/tail/src/error.rs index 2d0fdc40a32..d1525bdf0a9 100644 --- a/src/uu/tail/src/error.rs +++ b/src/uu/tail/src/error.rs @@ -167,7 +167,7 @@ impl TailErrorHandler { false, )?; } - TailError::Stat(_) | TailError::Read(_) => { + TailError::Stat(_) | TailError::Read(_) if self.input.path().is_some() => { // unwrap is safe here because only TailError::Open doesn't produce a File let file = file.unwrap(); match file.metadata() { @@ -189,6 +189,11 @@ impl TailErrorHandler { } } } + // FIXME: We're here on windows if the input was stdin, because we don't have a path on + // windows for stdin. Currently, the follow module depends on having a path for all + // inputs. This should be fixed. For now, we print the error message but don't follow + // the input and effectively do nothing. + TailError::Stat(_) | TailError::Read(_) => {} } Ok(())