always resolve icons relative to the crate, not the cwd of the CLI (#5020)
This commit is contained in:
1 parent
f7e102a0b4
commit
0dd2cb4b21
1 file changed
+12
@@ -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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user