fix: stop failing silently (#3682)
This commit is contained in:
1 parent
4199d545fe
commit
8b9e246044
1 file changed
+9
-1
@@ -1,5 +1,5 @@
|
||||
use crate::{AppBundle, BuildArgs, Builder, DioxusCrate, Platform};
|
||||
use anyhow::Context;
|
||||
use anyhow::{anyhow, Context};
|
||||
use path_absolutize::Absolutize;
|
||||
use std::collections::HashMap;
|
||||
use tauri_bundler::{BundleBinary, BundleSettings, PackageSettings, SettingsBuilder};
|
||||
@@ -159,6 +159,14 @@ impl Bundle {
|
||||
|
||||
let mut bundle_settings: BundleSettings = krate.config.bundle.clone().into();
|
||||
|
||||
// Check if required fields are provided instead of failing silently.
|
||||
if bundle_settings.identifier.is_none() {
|
||||
return Err(anyhow!("\n\nBundle identifier was not provided in `Dioxus.toml`. Add it as:\n\n[bundle]\nidentifier = \"com.mycompany\"\n\n").into());
|
||||
}
|
||||
if bundle_settings.publisher.is_none() {
|
||||
return Err(anyhow!("\n\nBundle publisher was not provided in `Dioxus.toml`. Add it as:\n\n[bundle]\npublisher = \"MyCompany\"\n\n").into());
|
||||
}
|
||||
|
||||
if cfg!(windows) {
|
||||
let windows_icon_override = krate.config.bundle.windows.as_ref().map(|w| &w.icon_path);
|
||||
if windows_icon_override.is_none() {
|
||||
|
||||
Reference in new issue
Block a user