INNER CODE UNIT · Python

write_text

IvanMurzak/Unity-MCP · .github/scripts/chain_feed.py:555

def write_text(path, text, newline=""):
    Path(path).parent.mkdir(parents=True, exist_ok=True)
    with io.open(str(path), "w", encoding="utf-8", newline=newline) as handle:
        handle.write(text)


def host_rid():
    """`win-x64` / `linux-x64` / `osx-arm64` — the RID this runner publishes for."""
    system = platform.system()
    if system == "Windows":
        return "win-x64"
    if system == "Darwin":
        return "osx-arm64" if platform.machine().lower() in ("arm64", "aarch64") else "osx-x64"
    return "linux-x64"


#: The characters cmd.exe treats as syntax even inside a double-quoted argument (`%`/`!`
#: expansion, `^` escape, `"` quote toggling) or outside one (`&`, `|`, `<`, `>`).

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…