Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(test): CRLF-unabhaengiger Test-Checkout in comfy_repair

purplec835cca867e8
diff --git a/src-tauri/src/commands/install/comfy_repair.rs b/src-tauri/src/commands/install/comfy_repair.rs
index 26970086..1005d8a3 100644
--- a/src-tauri/src/commands/install/comfy_repair.rs
+++ b/src-tauri/src/commands/install/comfy_repair.rs
@@ -1715,6 +1715,14 @@ mod tests {
assert!(out.status.success(), "git {:?} failed: {}", args, String::from_utf8_lossy(&out.stderr));
};
git(&["init", "-q"]);
+ // Make this repo's line-ending behaviour independent of the user's
+ // (or CI machine's) global git config. On Windows, a global
+ // core.autocrlf=true rewrites "a\n" to "a\r\n" on checkout, which
+ // breaks the exact string comparisons below even though the
+ // product's own git handling is unaffected. Pin both settings
+ // before the first commit so the test is self-contained.
+ git(&["config", "core.autocrlf", "false"]);
+ git(&["config", "core.eol", "lf"]);
std::fs::write(dir.join("requirements.txt"), "a\n").unwrap();
git(&["add", "."]);
git(&["commit", "-q", "-m", "a"]);