From 71180d19fba377bd0b541fe71c1adf09b24bbee6 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 4 Sep 2023 11:45:10 -0400 Subject: [PATCH] Fix reading contents from stdin in parse script. --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index edb1544..1d2320a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,12 +43,12 @@ fn main() -> Result<(), Box> { #[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))] fn main_body() -> Result<(), Box> { - let args = std::env::args(); + let args = std::env::args().skip(1); if args.is_empty() { let org_contents = read_stdin_to_string()?; run_anonymous_parse(org_contents) } else { - for arg in args.skip(1) { + for arg in args { run_parse_on_file(arg)? } Ok(())