summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 7c132b0..f68eaf2 100644
--- a/parse.c
+++ b/parse.c
@@ -3533,11 +3533,13 @@ struct cmdline *parse_cmdline(int argc, char *argv[]) {
}
bool stdin_tty = isatty(STDIN_FILENO);
- cmdline->warn = stdin_tty;
-
bool stdout_tty = isatty(STDOUT_FILENO);
bool stderr_tty = isatty(STDERR_FILENO);
+ if (!getenv("POSIXLY_CORRECT")) {
+ cmdline->warn = stdin_tty;
+ }
+
struct parser_state state = {
.cmdline = cmdline,
.argv = cmdline->argv + 1,