From 19fb5f0b20479885bf8bc4fdd8c431052420191d Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 5 Feb 2024 19:32:27 +0200 Subject: [PATCH] fix(build): fix writing schema file (#8782) * fix(build): fix writing schema file * Update .changes/schema_str.md --- .changes/schema_str.md | 5 +++++ core/tauri-build/src/acl.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/schema_str.md diff --git a/.changes/schema_str.md b/.changes/schema_str.md new file mode 100644 index 000000000..f9088ac49 --- /dev/null +++ b/.changes/schema_str.md @@ -0,0 +1,5 @@ +--- +'tauri-build': 'patch:bug' +--- + +Fix generating invalid schema files. diff --git a/core/tauri-build/src/acl.rs b/core/tauri-build/src/acl.rs index e995ced0f..b8226c058 100644 --- a/core/tauri-build/src/acl.rs +++ b/core/tauri-build/src/acl.rs @@ -181,7 +181,7 @@ pub fn generate_schema( let schema_path = out_dir.join(format!("{target}-{CAPABILITIES_SCHEMA_FILE_NAME}")); if schema_str != read_to_string(&schema_path).unwrap_or_default() { - write(&schema_path, "{schema_str}")?; + write(&schema_path, schema_str)?; copy( schema_path,