Skip to content

Commit

Permalink
fix(args): -o and -p are not allowed together
Browse files Browse the repository at this point in the history
setting prepend and output together will ignore the prepend flag

Signed-off-by: Anton Engelhardt <antoncengelhardt@icloud.com>
  • Loading branch information
antonengelhardt committed May 24, 2024
1 parent dd538c8 commit 9729624
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions git-cliff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ pub fn run(mut args: Opt) -> Result<()> {
)));
}
}
if args.output.is_some() && args.prepend.is_some() {
return Err(Error::ArgumentError(String::from(
"'-o' and '-p' cannot be used together",
)));
}
if args.body.is_some() {
config.changelog.body.clone_from(&args.body);
}
Expand Down

0 comments on commit 9729624

Please sign in to comment.