summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index ccc73e9a..e2cae73a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -587,7 +587,7 @@ int main(int argc, char* argv[]) {
jq_set_attr(jq, jv_string("VERSION_DIR"), jv_string_fmt("%.*s-master", (int)(strchr(JQ_VERSION, '-') - JQ_VERSION), JQ_VERSION));
#ifdef USE_ISATTY
- if (!program && (!isatty(STDOUT_FILENO) || !isatty(STDIN_FILENO)))
+ if (!program && !(options & FROM_FILE) && (!isatty(STDOUT_FILENO) || !isatty(STDIN_FILENO)))
program = ".";
#endif