Skip to content

Commit

Permalink
enable non-interactive mode when stdin is a pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Feb 20, 2023
1 parent df84a4b commit 483268c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gplaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ int main(int argc, char **argv) {
SSL_library_init();
SSL_load_error_strings();

interactive = isatty(STDOUT_FILENO);
interactive = isatty(STDIN_FILENO) && isatty(STDOUT_FILENO);
if (!(color = interactive && (getenv("NO_COLOR") == NULL))) memcpy(prompt, "> ", 3);

load_rc_files(parse_arguments(argc, argv));
Expand Down

0 comments on commit 483268c

Please sign in to comment.