File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
crates/tauri-utils/src/acl Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ tauri-utils : patch:bug
3+ ---
4+
5+ Fixed an issue that caused schema files to have ` \r ` characters on Windows.
Original file line number Diff line number Diff line change @@ -317,6 +317,9 @@ pub fn generate_capability_schema(
317317 extend_permission_entry_schema ( & mut schema, acl) ;
318318
319319 let schema_str = serde_json:: to_string_pretty ( & schema) . unwrap ( ) ;
320+ // FIXME: in schemars@v1 this doesn't seem to be necessary anymore. If it is, find a better solution.
321+ let schema_str = schema_str. replace ( "\\ r\\ n" , "\\ n" ) ;
322+
320323 let out_dir = PathBuf :: from ( CAPABILITIES_SCHEMA_FOLDER_PATH ) ;
321324 fs:: create_dir_all ( & out_dir) ?;
322325
@@ -389,6 +392,9 @@ pub fn generate_permissions_schema<P: AsRef<Path>>(
389392
390393 let schema_str = serde_json:: to_string_pretty ( & schema) ?;
391394
395+ // FIXME: in schemars@v1 this doesn't seem to be necessary anymore. If it is, find a better solution.
396+ let schema_str = schema_str. replace ( "\\ r\\ n" , "\\ n" ) ;
397+
392398 let out_dir = out_dir. as_ref ( ) . join ( PERMISSION_SCHEMAS_FOLDER_NAME ) ;
393399 fs:: create_dir_all ( & out_dir) . map_err ( |e| Error :: CreateDir ( e, out_dir. clone ( ) ) ) ?;
394400
You can’t perform that action at this time.
0 commit comments