mirror of
https://github.com/ultraworkers/claw-code.git
synced 2026-05-30 03:35:20 +08:00
fix: suppress partial cc2 wrapper validate pass output (#3177)
This commit is contained in:
parent
e17098cc70
commit
d4e9829329
@ -16,6 +16,16 @@ def run(cmd: list[str], cwd: Path) -> int:
|
|||||||
return subprocess.run(cmd, cwd=str(cwd)).returncode
|
return subprocess.run(cmd, cwd=str(cwd)).returncode
|
||||||
|
|
||||||
|
|
||||||
|
def run_quiet_until_failure(cmd: list[str], cwd: Path) -> int:
|
||||||
|
result = subprocess.run(cmd, cwd=str(cwd), text=True, capture_output=True)
|
||||||
|
if result.returncode:
|
||||||
|
if result.stdout:
|
||||||
|
print(result.stdout, end="")
|
||||||
|
if result.stderr:
|
||||||
|
print(result.stderr, end="", file=sys.stderr)
|
||||||
|
return result.returncode
|
||||||
|
|
||||||
|
|
||||||
def main(argv: list[str] | None = None) -> int:
|
def main(argv: list[str] | None = None) -> int:
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
parser.add_argument("command", choices=["generate", "validate"])
|
parser.add_argument("command", choices=["generate", "validate"])
|
||||||
@ -45,7 +55,7 @@ def main(argv: list[str] | None = None) -> int:
|
|||||||
[sys.executable, str(renderer), str(board_json), str(board_md), "--check"],
|
[sys.executable, str(renderer), str(board_json), str(board_md), "--check"],
|
||||||
]
|
]
|
||||||
for cmd in checks:
|
for cmd in checks:
|
||||||
rc = run(cmd, repo_root)
|
rc = run_quiet_until_failure(cmd, repo_root)
|
||||||
if rc:
|
if rc:
|
||||||
return rc
|
return rc
|
||||||
print(f"CC2 board validation PASS: {board_json} and {board_md} are canonical and in sync")
|
print(f"CC2 board validation PASS: {board_json} and {board_md} are canonical and in sync")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user