aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart/src/commands')
-rw-r--r--crates/mozart/src/commands/bump.rs5
-rw-r--r--crates/mozart/src/commands/global.rs4
2 files changed, 5 insertions, 4 deletions
diff --git a/crates/mozart/src/commands/bump.rs b/crates/mozart/src/commands/bump.rs
index b322dbe..e1b5f63 100644
--- a/crates/mozart/src/commands/bump.rs
+++ b/crates/mozart/src/commands/bump.rs
@@ -311,12 +311,13 @@ mod tests {
fn make_cli(working_dir: &std::path::Path) -> super::super::Cli {
super::super::Cli {
- command: super::super::Commands::Bump(BumpArgs {
+ command: Some(super::super::Commands::Bump(BumpArgs {
packages: vec![],
dev_only: false,
no_dev_only: false,
dry_run: false,
- }),
+ })),
+ version: false,
verbose: 0,
profile: false,
no_plugins: false,
diff --git a/crates/mozart/src/commands/global.rs b/crates/mozart/src/commands/global.rs
index 97d56d2..dfa4fc2 100644
--- a/crates/mozart/src/commands/global.rs
+++ b/crates/mozart/src/commands/global.rs
@@ -221,7 +221,7 @@ mod tests {
fn test_global_args_has_correct_command() {
// Verify GlobalArgs parses correctly through the CLI
let cli = Cli::try_parse_from(["mozart", "global", "require", "vendor/package"]).unwrap();
- if let Commands::Global(args) = cli.command {
+ if let Some(Commands::Global(args)) = cli.command {
assert_eq!(args.command_name, "require");
assert_eq!(args.args, vec!["vendor/package"]);
} else {
@@ -234,7 +234,7 @@ mod tests {
// Verify hyphen values in trailing args are accepted
let cli = Cli::try_parse_from(["mozart", "global", "require", "vendor/pkg", "--no-update"])
.unwrap();
- if let Commands::Global(args) = cli.command {
+ if let Some(Commands::Global(args)) = cli.command {
assert_eq!(args.command_name, "require");
assert!(args.args.contains(&"--no-update".to_string()));
} else {