mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 18:40:18 +00:00
fix(bls): quirk for when the version field is present already in the title
This commit is contained in:
@@ -186,8 +186,9 @@ pub fn generate(context: Rc<SproutContext>, bls: &BlsConfiguration) -> Result<Ve
|
|||||||
// Put the initrd through a quirk modifier to support Fedora.
|
// Put the initrd through a quirk modifier to support Fedora.
|
||||||
let initrd = quirk_initrd_remove_tuned(entry.initrd_path().unwrap_or_default());
|
let initrd = quirk_initrd_remove_tuned(entry.initrd_path().unwrap_or_default());
|
||||||
|
|
||||||
// Combine the title with the version if a version is present.
|
// Combine the title with the version if a version is present, except if it already contains it.
|
||||||
let title_full = if !version.is_empty() {
|
// Sometimes BLS will have a version in the title already, and this makes it unique.
|
||||||
|
let title_full = if !version.is_empty() && !title_base.contains(&version) {
|
||||||
format!("{} {}", title_base, version)
|
format!("{} {}", title_base, version)
|
||||||
} else {
|
} else {
|
||||||
title_base.clone()
|
title_base.clone()
|
||||||
|
|||||||
Reference in New Issue
Block a user