Skip to content

Commit 32893ff

Browse files
committed
fix: remove conflicts-with
1 parent 9fd05e8 commit 32893ff

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum Commands {
4848
command: Option<String>,
4949

5050
/// Name of a recipe defined in config.yaml
51-
#[arg(long, conflicts_with = "command")]
51+
#[arg(long)]
5252
recipe: Option<String>,
5353

5454
/// Specific repository names to run command in (if not provided, uses tag filter or all repos)

tests/cli_tests.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,28 @@ fn test_run_command_missing_command_and_recipe() {
5252
assert!(stderr.contains("Either --recipe or a command must be provided"));
5353
}
5454

55+
#[test]
56+
fn test_run_command_both_command_and_recipe() {
57+
let output = Command::new("cargo")
58+
.args([
59+
"run",
60+
"--",
61+
"run",
62+
"--recipe",
63+
"test-recipe",
64+
"echo hello",
65+
"--config",
66+
"tests/test-recipes.yaml",
67+
])
68+
.output()
69+
.expect("Failed to execute cargo run");
70+
71+
assert!(!output.status.success());
72+
let stderr = String::from_utf8_lossy(&output.stderr);
73+
// Should fail because both command and recipe are provided
74+
assert!(stderr.contains("Cannot specify both command and --recipe"));
75+
}
76+
5577
#[test]
5678
fn test_pr_command_missing_required_args() {
5779
let output = Command::new("cargo")

0 commit comments

Comments
 (0)