src/nnn.c | 12 ++++++------ diff --git a/src/nnn.c b/src/nnn.c index 175faed6fce1e2cbf115a1b46b30644dd9b7bc43..3bcdca224ec1472126c765855590f7b0d73d9895 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3548,12 +3548,6 @@ char cwd[PATH_MAX] __attribute__ ((aligned)); char *ipath = NULL; int opt; - /* Confirm we are in a terminal */ - if (!isatty(0) || !isatty(1)) { - fprintf(stderr, "stdin or stdout is not a tty\n"); - return 1; - } - while ((opt = getopt(argc, argv, "Slib:Cep:vh")) != -1) { switch (opt) { case 'S': @@ -3600,6 +3594,12 @@ default: usage(); return 1; } + } + + /* Confirm we are in a terminal */ + if (!isatty(0) || !isatty(1)) { + fprintf(stderr, "stdin or stdout is not a tty\n"); + return 1; } /* Get the context colors; copier used as tmp var */