Browse Source

fix(build): fix writing schema file (#8782)

* fix(build): fix writing schema file

* Update .changes/schema_str.md
Amr Bashir 1 năm trước cách đây
mục cha
commit
19fb5f0b20
2 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 5 0
      .changes/schema_str.md
  2. 1 1
      core/tauri-build/src/acl.rs

+ 5 - 0
.changes/schema_str.md

@@ -0,0 +1,5 @@
+---
+'tauri-build': 'patch:bug'
+---
+
+Fix generating invalid schema files.

+ 1 - 1
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,