From fffaa74a099897ed5308a78043a5dac701301d9b Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 24 Apr 2020 20:30:16 +0530 Subject: [PATCH] Fix return and show error --- src/nnn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nnn.c b/src/nnn.c index 5f90fae8..b9bb23c9 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6828,8 +6828,10 @@ int main(int argc, char *argv[]) } /* Prevent picker and list mode conflict */ - if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO)) - exit(1); + if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO)) { + fprintf(stderr, "stdin/out conflict\n"); + return _FAILURE; + } home = getenv("HOME"); if (!home) {