From 0672fb7d2dc1cf84c65e5007577213cd336abafa Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Sat, 3 Feb 2024 21:37:56 -0800 Subject: [PATCH] cargo-insta --disable-nextest-doctest: Add `-N` short option I'm not sure how appropriate this is for general use, but it's convenient if, like me, you have a project where you use this all the time. --- cargo-insta/src/cli.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cargo-insta/src/cli.rs b/cargo-insta/src/cli.rs index 26a6ccf9..3c3aad25 100644 --- a/cargo-insta/src/cli.rs +++ b/cargo-insta/src/cli.rs @@ -171,7 +171,7 @@ struct TestRunnerOptions { #[arg(long)] target: Option, /// Do not run `cargo test --doc` after `cargo nextest`, even if test specifiers would otherwise include doctests. - #[arg(long)] + #[arg(long, short = 'N')] disable_nextest_doctest: bool, } @@ -843,7 +843,7 @@ fn prepare_test_runner<'snapshot_ref>( None }; let mut prevents_doc_run = false; - if cmd.disable_nextest_doctest { + if cmd.test_runner_options.disable_nextest_doctest { prevents_doc_run = true; } if cmd.target_args.all || cmd.target_args.workspace {