Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions git-cliff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ pub mod args;
/// Custom logger implementation.
pub mod logger;

use std::env;
use std::fs::{self, File};
use std::io::{self, Write};
use std::path::{Path, PathBuf};
use std::time::{SystemTime, UNIX_EPOCH};
use std::{env, io};

use args::{BumpOption, Opt, Sort, Strip};
use clap::ValueEnum;
Expand Down Expand Up @@ -805,7 +806,11 @@ pub fn run_with_changelog_modifier(
}
}
if args.bumped_version {
writeln!(out, "{next_version}")?;
if config.changelog.output.is_none() {
writeln!(out, "{next_version}")?;
} else {
writeln!(io::stdout(), "{next_version}")?;
}
return Ok(());
}
}
Expand Down
Loading