diff --git a/.changes/fix-dmg-failed-with-out-dir.md b/.changes/fix-dmg-failed-with-out-dir.md new file mode 100644 index 00000000..fe468983 --- /dev/null +++ b/.changes/fix-dmg-failed-with-out-dir.md @@ -0,0 +1,5 @@ +--- +"cargo-packager": patch +--- + +Fixed dmg failed to bundle the application when out-dir does not exist. diff --git a/crates/packager/src/util.rs b/crates/packager/src/util.rs index fa3f9bc8..6e130a0f 100644 --- a/crates/packager/src/util.rs +++ b/crates/packager/src/util.rs @@ -315,7 +315,7 @@ pub fn create_icns_file(out_dir: &Path, config: &crate::Config) -> crate::Result ); std::fs::copy(&icon_path, &dest_path)?; - return Ok(Some(dest_path)); + return Ok(Some(dunce::canonicalize(dest_path)?)); } } } @@ -379,7 +379,7 @@ pub fn create_icns_file(out_dir: &Path, config: &crate::Config) -> crate::Result dest_path.set_extension("icns"); let icns_file = std::io::BufWriter::new(File::create(&dest_path)?); family.write(icns_file)?; - Ok(Some(dest_path)) + Ok(Some(dunce::canonicalize(dest_path)?)) } else { Err(crate::Error::InvalidIconList) }