commit - f4086c716b2f27f2f0e34157dcd64960589a3c9f
commit + 5ffbe221c75789cd2cdb37e1b20f1a575a20447f
blob - 51022b6090574aeb9224b976148c4f0a2979f53f
blob + df86e8d4e17b764a18770b42ad3f1995c6200707
--- tog/tog.c
+++ tog/tog.c
fprintf(stderr, "%s: %s\n", getprogname(), error->msg);
return 1;
}
- }
+ } else if (!isatty(STDIN_FILENO))
+ errx(1, "standard input is not a tty");
#if !defined(PROFILE)
if (pledge("stdio rpath wpath cpath flock proc tty exec sendfd unveil",
err(1, "pledge");
#endif
- if (!isatty(STDIN_FILENO))
- errx(1, "standard input is not a tty");
-
while ((ch = getopt_long(argc, argv, "+hV", longopts, NULL)) != -1) {
switch (ch) {
case 'h':