From 140a9bfa8f4a7eaf1bfaa0cdf1742f034e268d81 Mon Sep 17 00:00:00 2001 From: Zicklag Date: Tue, 20 Jul 2021 15:09:23 -0500 Subject: [PATCH] Fix Regression With CLI Not Working for Validation Allows output file to be left empty to perform validation only. --- cli/src/main.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index d363359a28..701e1cad16 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -38,13 +38,9 @@ struct Args { #[argh(positional)] input: String, - /// the output file + /// the output file. If not specified, only validation will be performed #[argh(positional)] - output: String, - - /// other output files if there are multiples - #[argh(positional)] - extra_outputs: Vec, + output: Vec, } /// Newtype so we can implement [`FromStr`] for `IndexBoundsCheckPolicy`. @@ -181,8 +177,7 @@ fn run() -> Result<(), Box> { // Parse commandline arguments let args: Args = argh::from_env(); let input_path = Path::new(&args.input); - let mut output_paths = vec![args.output]; - output_paths.extend(args.extra_outputs); + let output_paths = args.output; // Update parameters from commandline arguments if args.validate {