Fix reading contents from stdin in parse script.
rustfmt Build rustfmt has succeeded Details
rust-test Build rust-test has succeeded Details
rust-build Build rust-build has succeeded Details

This commit is contained in:
Tom Alexander 2023-09-04 11:45:10 -04:00
parent 33091112a5
commit 71180d19fb
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 2 additions and 2 deletions

View File

@ -43,12 +43,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn main_body() -> Result<(), Box<dyn std::error::Error>> {
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(())