Skip to content

Commit 3880b42

Browse files
authored
feat(bundler): enhance notarization error message (#7974)
1 parent 9bead42 commit 3880b42

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": patch:enhance
3+
---
4+
5+
Include notarytool log output on error message in case notarization fails.

tooling/bundler/src/bundle/macos/sign.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,22 @@ pub fn notarize(
306306
staple_app(app_bundle_path)?;
307307
Ok(())
308308
} else {
309-
Err(anyhow::anyhow!("{log_message}").into())
309+
if let Ok(output) = Command::new("xcrun")
310+
.args(["notarytool", "log"])
311+
.arg(&submit_output.id)
312+
.notarytool_args(&auth)
313+
.output_ok()
314+
{
315+
Err(
316+
anyhow::anyhow!(
317+
"{log_message}\nLog:\n{}",
318+
String::from_utf8_lossy(&output.stdout)
319+
)
320+
.into(),
321+
)
322+
} else {
323+
Err(anyhow::anyhow!("{log_message}").into())
324+
}
310325
}
311326
} else {
312327
Err(anyhow::anyhow!("failed to parse notarytool output as JSON: `{output_str}`").into())

0 commit comments

Comments
 (0)