Skip to content

Commit bc6b125

Browse files
fix(bundler): replace empty RPM release value with 1 (#13909)
Co-authored-by: Fabian-Lars <[email protected]>
1 parent 9c938be commit bc6b125

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tauri-bundler: "patch:bug"
3+
---
4+
5+
The bundler now falls back to `1` for the release in case an empty string was provided instead of using `-.` in the file name.

crates/tauri-bundler/src/bundle/linux/rpm.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ use super::freedesktop;
2121
pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
2222
let product_name = settings.product_name();
2323
let version = settings.version_string();
24-
let release = settings.rpm().release.as_str();
24+
let release = match settings.rpm().release.as_str() {
25+
"" => "1", // Considered the default. If left empty, you get file with "-.".
26+
v => v,
27+
};
2528
let epoch = settings.rpm().epoch;
2629
let arch = match settings.binary_arch() {
2730
Arch::X86_64 => "x86_64",
@@ -234,6 +237,5 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
234237

235238
let mut f = fs::File::create(&package_path)?;
236239
pkg.write(&mut f)?;
237-
238240
Ok(vec![package_path])
239241
}

0 commit comments

Comments
 (0)