From 2f97601736985a62898eb0b54cc485926c283879 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sat, 13 Jul 2024 09:05:13 +0200 Subject: [PATCH] Don't complain about stdin with --quit-ater-scan That flag is for benchmarking, we're not expecting to have user input. --- src/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index c55626d..61d9ef8 100644 --- a/src/main.zig +++ b/src/main.zig @@ -498,7 +498,7 @@ pub fn main() void { else config.scan_ui = .line; } else config.scan_ui = .full; } - if (!in_tty and import_file == null and export_file == null) + if (!in_tty and import_file == null and export_file == null and !quit_after_scan) ui.die("Standard input is not a TTY. Did you mean to import a file using '-f -'?\n", .{}); config.nc_tty = !in_tty or (if (export_file) |f| std.mem.eql(u8, f, "-") else false);