Skip to content

Commit cfcc5ae

Browse files
authored
fix(config): respect the changelog.output configuration (#1349)
1 parent 5d955c1 commit cfcc5ae

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

git-cliff/src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ fn main() -> Result<()> {
4949
// Generate a changelog.
5050
let changelog = git_cliff::run(args.clone())?;
5151

52-
// Get output file.
53-
let out: Box<dyn io::Write> = if let Some(path) = &args.output {
52+
// Get output destination.
53+
let output = args
54+
.output
55+
.clone()
56+
.or(changelog.config.changelog.output.clone());
57+
let out: Box<dyn io::Write> = if let Some(path) = &output {
5458
if path == Path::new("-") {
5559
Box::new(io::stdout())
5660
} else {

0 commit comments

Comments
 (0)