aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/tail.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toys/posix/tail.c b/toys/posix/tail.c
index 98309c0f..0d13ab01 100644
--- a/toys/posix/tail.c
+++ b/toys/posix/tail.c
@@ -188,7 +188,9 @@ static void do_tail(int fd, char *name)
long bytes = TT.c, lines = TT.n;
int linepop = 1;
- if (fd == -1 && !FLAG(F)) return;
+ if (FLAG(F)) {
+ if (!fd) perror_exit("no -F with '-'");
+ } else if (fd == -1) return;
if (FLAG(f) || FLAG(F)) {
char *s = name;
struct stat sb;