From f712f31d1d21e85fab99194530702c70e45c63fc Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 15 Aug 2024 14:12:03 -0300 Subject: [PATCH] fix(cli): add notarize error (#10639) * fix: add notarize error * add change file --- .changes/add-notarize-error.md | 6 ++++++ tooling/macos-sign/src/lib.rs | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changes/add-notarize-error.md diff --git a/.changes/add-notarize-error.md b/.changes/add-notarize-error.md new file mode 100644 index 000000000..2f553e664 --- /dev/null +++ b/.changes/add-notarize-error.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:bug +"@tauri-apps/cli": patch:bug +--- + +Include notarization error output in the error message if it fails. diff --git a/tooling/macos-sign/src/lib.rs b/tooling/macos-sign/src/lib.rs index 2ccaf3927..125ee015a 100644 --- a/tooling/macos-sign/src/lib.rs +++ b/tooling/macos-sign/src/lib.rs @@ -98,7 +98,10 @@ pub fn notarize( .context("failed to upload app to Apple's notarization servers.")?; if !output.status.success() { - return Err(anyhow::anyhow!("failed to notarize app")); + return Err( + anyhow::anyhow!("failed to notarize app") + .context(String::from_utf8_lossy(&output.stderr).into_owned()), + ); } let output_str = String::from_utf8_lossy(&output.stdout);