Fix: Updater signer failed signing file without extension (#14713)

* fixing bug where updater signer failed signing file withou extension

* removing  unnecessary unwrap()

* Adding change file. Removing commnent. Adding TODO.

* Apply suggestions from code review

---------

Co-authored-by: Wuelfhis Asuaje <wasuaje@shorecg.com>
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
This commit is contained in:
Wuelfhis Asuaje
2026-01-13 22:09:45 -03:00
committed by GitHub
parent 84b04c4a8d
commit 1b0e335d3f
2 changed files with 14 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
---
tauri-cli: patch:bug
"@tauri-apps/cli": patch:bug
---
`tauri signer sign` doesn't work for files without an extension

View File

@@ -120,9 +120,14 @@ where
{
let bin_path = bin_path.as_ref();
// We need to append .sig at the end it's where the signature will be stored
let mut extension = bin_path.extension().unwrap().to_os_string();
extension.push(".sig");
let signature_path = bin_path.with_extension(extension);
// TODO: use with_added_extension when we bump MSRV to > 1.91'
let signature_path = if let Some(ext) = bin_path.extension() {
let mut extension = ext.to_os_string();
extension.push(".sig");
bin_path.with_extension(extension)
} else {
bin_path.with_extension("sig")
};
let trusted_comment = format!(
"timestamp:{}\tfile:{}",