Description
When input comes from a pipe or fifo on windows and android platforms there is no output and no processing of that input, at all. This is part of the problem when determining if the input is a fifo, pipe, file etc. A related issue is #3845. The if check here
coreutils/src/uu/tail/src/tail.rs
Line 439 in 0dbcdde
fails because path_is_tailable resolves to false because the check in path.is_tailable()
coreutils/src/uu/tail/src/tail.rs
Line 1635 in 0dbcdde
returns false. On windows platforms (and I assume on android platforms, too) the statement self.is_file() || self.exists() = false
resolves to false. This leads to the input not handled and silently ignored, since the if ... else if .. else if
chain above misses an else
branch, where I would at least expect an error message. To me, the determination of tailable
and if a path is fifo, pipe
looks broken and is scattered over a 2000 lines file. Wouldn't it be clearer to determine with which kind of input and files we're dealing with right from the start when parsing the settings, store what we've found in a struct or enum and then handle all cases? Looking at this big tail file. refactoring tail.rs to be clearer would help resolving the different handling of input on different platforms.