feat(protocol): freeze M4 native session RC6 contract
This commit is contained in:
@@ -4,12 +4,17 @@ from __future__ import annotations
|
||||
import pathlib
|
||||
import subprocess
|
||||
import tempfile
|
||||
import os
|
||||
|
||||
ROOT = pathlib.Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def run(command: list[str]) -> None:
|
||||
result = subprocess.run(command, cwd=ROOT, text=True, capture_output=True)
|
||||
environment = os.environ.copy()
|
||||
cache_root = pathlib.Path(tempfile.gettempdir()) / "versevdi-protocol-module-cache"
|
||||
environment.setdefault("CLANG_MODULE_CACHE_PATH", str(cache_root / "clang"))
|
||||
environment.setdefault("SWIFT_MODULECACHE_PATH", str(cache_root / "swift"))
|
||||
result = subprocess.run(command, cwd=ROOT, env=environment, text=True, capture_output=True)
|
||||
if result.returncode != 0:
|
||||
raise SystemExit(result.stdout + result.stderr)
|
||||
print(result.stdout.strip())
|
||||
|
||||
Reference in New Issue
Block a user