pspp-output: Don't write binary data to a terminal for dump-legacy-data.
[pspp] / utilities / pspp-output.c
index 6fdf48918a786b9ed601b6ba4acca1e447ed5f58..d918496e8d44b0449bb094dd7018fbb1ee67f6bc 100644 (file)
@@ -513,6 +513,9 @@ run_dump_legacy_data (int argc UNUSED, char **argv)
   if (err)
     error (1, 0, "%s", err);
 
+  if (raw && isatty (STDOUT_FILENO))
+    error (1, 0, "not writing binary data to tty");
+
   struct spv_item **items;
   size_t n_items;
   spv_select (spv, criteria, n_criteria, &items, &n_items);