commit - 906c73f69f5ab088561e8f1378c27d852a022e37
commit + 69b9e75f5436338a9b5cddd5b8462929def12e8c
blob - ce6df683d22ae7ee7dcf845076a046795faad31d
blob + 69803386ef3f054281b09871e9eb299e4c663e2b
--- 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':