Skip to content

Commit

Permalink
Show usage when stdin is a tty and no args provided
Browse files Browse the repository at this point in the history
  • Loading branch information
marcransome committed Sep 28, 2024
1 parent 08d8637 commit 5930d91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "flog.h"
#include "common.h"

int
main(int argc, char *argv[]) {

if (argc == 1 ) {
if (argc == 1 && isatty(fileno(stdin))) {
flog_usage();
return 1;
}
Expand Down

0 comments on commit 5930d91

Please sign in to comment.