Skip to content

Commit e191214

Browse files
enhance(cli): don't always rewrite CRLF in Cargo.toml (#15993)
1 parent 406feea commit e191214

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎.changes/allow-crlf-cargo-toml.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-cli": patch:enhance
3+
"@tauri-apps/cli": patch:enhance
4+
---
5+
6+
Don't always rewrite `Cargo.toml` file from CRLF line endings to LF

‎crates/tauri-cli/src/interface/rust/manifest.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ pub fn rewrite_manifest(config: &Config, tauri_dir: &Path) -> crate::Result<(Man
309309

310310
let new_manifest_str = serialize_manifest(&manifest);
311311

312-
if persist && original_manifest_str != new_manifest_str {
312+
if persist && original_manifest_str.replace("\r\n", "\n") != new_manifest_str {
313313
std::fs::write(&manifest_path, new_manifest_str)
314314
.fs_context("failed to rewrite Cargo manifest", &manifest_path)?;
315315
Ok((

0 commit comments

Comments
 (0)