mirror of
https://github.com/jarun/nnn.git
synced 2025-03-18 20:39:45 +00:00
Confirm we are in a terminal
This commit is contained in:
parent
97cfd82eed
commit
bc11d7b201
1 changed files with 4 additions and 0 deletions
4
noice.c
4
noice.c
|
@ -835,6 +835,10 @@ main(int argc, char *argv[])
|
||||||
char cwd[PATH_MAX], *ipath;
|
char cwd[PATH_MAX], *ipath;
|
||||||
char *ifilter;
|
char *ifilter;
|
||||||
|
|
||||||
|
/* Confirm we are in a terminal */
|
||||||
|
if (!isatty(STDIN_FILENO))
|
||||||
|
printerr(1, "isatty");
|
||||||
|
|
||||||
if (getuid() == 0)
|
if (getuid() == 0)
|
||||||
ifilter = ".";
|
ifilter = ".";
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue