diff options
Diffstat (limited to 'crates/mozart/src/commands/outdated.rs')
| -rw-r--r-- | crates/mozart/src/commands/outdated.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/mozart/src/commands/outdated.rs b/crates/mozart/src/commands/outdated.rs index 1807435..5c7b691 100644 --- a/crates/mozart/src/commands/outdated.rs +++ b/crates/mozart/src/commands/outdated.rs @@ -101,6 +101,12 @@ pub async fn execute( cli: &super::Cli, _console: &mozart_core::console::Console, ) -> anyhow::Result<()> { + // Validate mutually exclusive level filters + let level_count = args.major_only as u8 + args.minor_only as u8 + args.patch_only as u8; + if level_count > 1 { + anyhow::bail!("Only one of --major-only, --minor-only or --patch-only can be used at once"); + } + let working_dir = match &cli.working_dir { Some(dir) => PathBuf::from(dir), None => std::env::current_dir()?, |
