Skip to content

Commit 23d3d84

Browse files
authored
fix(bundler): ensure RequestUUID and Status parser adds a \n, closes #4549 (#4559)
1 parent 34879f7 commit 23d3d84

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": patch
3+
---
4+
5+
Ensure the notarization `RequestUUID` and `Status` parser works even if the altool output does not have a newline after it.

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,10 @@ pub fn notarize(
275275
.output_ok()
276276
.context("failed to upload app to Apple's notarization servers.")?;
277277

278-
let stdout = std::str::from_utf8(&output.stdout)?;
278+
let mut stdout = std::str::from_utf8(&output.stdout)?.to_string();
279+
stdout.push('\n');
279280
if let Some(uuid) = Regex::new(r"\nRequestUUID = (.+?)\n")?
280-
.captures_iter(stdout)
281+
.captures_iter(&stdout)
281282
.next()
282283
{
283284
info!("notarization started; waiting for Apple response...");
@@ -325,9 +326,10 @@ fn get_notarization_status(
325326
.output_ok();
326327

327328
if let Ok(output) = result {
328-
let stdout = std::str::from_utf8(&output.stdout)?;
329+
let mut stdout = std::str::from_utf8(&output.stdout)?.to_string();
330+
stdout.push('\n');
329331
if let Some(status) = Regex::new(r"\n *Status: (.+?)\n")?
330-
.captures_iter(stdout)
332+
.captures_iter(&stdout)
331333
.next()
332334
{
333335
let status = status[1].to_string();

0 commit comments

Comments
 (0)