mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
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:
6
.changes/updater-signer-files-without-extension.md
Normal file
6
.changes/updater-signer-files-without-extension.md
Normal 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
|
||||
@@ -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:{}",
|
||||
|
||||
Reference in New Issue
Block a user