about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 955158831..33fed62dd 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -67,7 +67,8 @@ zwarn(const char *fmt, const char *str, int num)
 {
     if (errflag || noerrs)
 	return;
-    trashzle();
+    if (isatty(2))
+	trashzle();
     /*
      * scriptname is set when sourcing scripts, so that we get the
      * correct name instead of the generic name of whatever