Skip to content

Commit

Permalink
feat(packager): enhance Apple notarization error message (#267)
Browse files Browse the repository at this point in the history
* feat(packager): enhance Apple notarization error message

Ref tauri-apps/tauri#7974

* fix change file
  • Loading branch information
lucasfernog-crabnebula committed Sep 2, 2024
1 parent 21441f3 commit f836afa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/enhance-notarize-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-packager": patch
---

Include notarytool log output on error message in case notarization fails.
10 changes: 10 additions & 0 deletions crates/packager/src/codesign/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,16 @@ pub fn notarize(
tracing::info!("Notarizing {}", log_message);
staple_app(app_bundle_path)?;
Ok(())
} else if let Ok(output) = Command::new("xcrun")
.args(["notarytool", "log"])
.arg(&submit_output.id)
.notarytool_args(&auth)
.output_ok()
{
Err(Error::NotarizeRejected(format!(
"{log_message}\nLog:\n{}",
String::from_utf8_lossy(&output.stdout),
)))
} else {
Err(Error::NotarizeRejected(log_message))
}
Expand Down

0 comments on commit f836afa

Please sign in to comment.