Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

fix(ci): terminate GitHub env lines portably

Rach Pradhan8ba5f8c4a638
diff --git a/scripts/install-zig-ci.py b/scripts/install-zig-ci.py
index 07a90fcf..d559453f 100644
--- a/scripts/install-zig-ci.py
+++ b/scripts/install-zig-ci.py
@@ -146,7 +146,7 @@ def main() -> int:
if not github_path:
parser.error("GITHUB_PATH is required on a GitHub Actions runner")
with Path(github_path).open("a", encoding="utf-8") as path_file:
- path_file.write(str(install_dir) + os.linesep)
+ path_file.write(str(install_dir) + "\n")
github_env = os.environ.get("GITHUB_ENV")
github_workspace = os.environ.get("GITHUB_WORKSPACE")
@@ -156,7 +156,7 @@ def main() -> int:
if "\n" in str(global_cache) or "\r" in str(global_cache):
parser.error("GITHUB_WORKSPACE may not contain newlines")
with Path(github_env).open("a", encoding="utf-8") as env_file:
- env_file.write(f"ZIG_GLOBAL_CACHE_DIR={global_cache}{os.linesep}")
+ env_file.write(f"ZIG_GLOBAL_CACHE_DIR={global_cache}\n")
print(f"Installed Zig {actual_version} at {install_dir}")
return 0