mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-01 03:02:28 +03:00
This commit is contained in:
parent
8b7ac1ad14
commit
1a41e9f040
5
.changes/cli-error-message.md
Normal file
5
.changes/cli-error-message.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
---
|
||||
|
||||
Improve error message when the product name is invalid.
|
@ -133,12 +133,21 @@ impl Build {
|
||||
if let Some(product_name) = config_.package.product_name.clone() {
|
||||
let bin_name = app_settings.cargo_package_settings().name.clone();
|
||||
#[cfg(windows)]
|
||||
rename(
|
||||
out_dir.join(format!("{}.exe", bin_name)),
|
||||
out_dir.join(format!("{}.exe", product_name)),
|
||||
)?;
|
||||
let (bin_path, product_path) = {
|
||||
(
|
||||
out_dir.join(format!("{}.exe", bin_name)),
|
||||
out_dir.join(format!("{}.exe", product_name)),
|
||||
)
|
||||
};
|
||||
#[cfg(not(windows))]
|
||||
rename(out_dir.join(bin_name), out_dir.join(product_name))?;
|
||||
let (bin_path, product_path) = { (out_dir.join(bin_name), out_dir.join(product_name)) };
|
||||
rename(&bin_path, &product_path).with_context(|| {
|
||||
format!(
|
||||
"failed to rename `{}` to `{}`",
|
||||
bin_path.display(),
|
||||
product_path.display(),
|
||||
)
|
||||
})?;
|
||||
}
|
||||
|
||||
if config_.tauri.bundle.active {
|
||||
|
Loading…
Reference in New Issue
Block a user