Skip to content

Open-source SEO, GEO, and marketing skills for AI agents.

fix: preserve LF for Bash helpers on Windows

Bortlesboate5115048f2cf
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..f59fc42b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+*.sh text eol=lf
+bin/notfair-change-watch text eol=lf
+bin/notfair-config text eol=lf
+bin/notfair-update-check text eol=lf
diff --git a/test/unit/test_shell_line_endings.py b/test/unit/test_shell_line_endings.py
new file mode 100644
index 00000000..1e162c78
--- /dev/null
+++ b/test/unit/test_shell_line_endings.py
@@ -0,0 +1,18 @@
+"""Bash entrypoints must remain runnable in Windows checkouts."""
+
+from pathlib import Path
+
+import pytest
+
+
+ROOT = Path(__file__).resolve().parents[2]
+HELPERS = [
+ "bin/notfair-change-watch",
+ "bin/notfair-config",
+ "bin/notfair-update-check",
+]
+
+
[email protected]("relative_path", HELPERS)
+def test_bash_helper_uses_lf(relative_path):
+ assert b"\r\n" not in (ROOT / relative_path).read_bytes()