always resolve icons relative to the crate, not the cwd of the CLI (#5020)

This commit is contained in:
Evan Almloff authored and GitHub committed 2025-11-24 16:42:20 -08:00
1 parent f7e102a0b4
commit 0dd2cb4b21
1 file changed
+12
+12
View File
@@ -197,6 +197,18 @@ impl Bundle {
}
}
// resolve the icon relative to the crate, not the current working directory
if let Some(icons) = bundle_settings.icon.as_mut() {
for icon in icons {
let icon_path = build
.crate_dir()
.join(&icon)
.canonicalize()
.with_context(|| format!("Failed to canonicalize path to icon {icon:?}"))?;
*icon = icon_path.to_string_lossy().to_string();
}
}
if bundle_settings.resources_map.is_none() {
bundle_settings.resources_map = Some(HashMap::new());
}