From c2bf5888d0b6935f0cc1714056e0bc69e3decb98 Mon Sep 17 00:00:00 2001 From: Julian Lechner Date: Fri, 18 Sep 2026 11:59:06 +0200 Subject: [PATCH] test(telemetry): use Git Bash on Windows --- scripts/tests/test-telemetry.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/tests/test-telemetry.py b/scripts/tests/test-telemetry.py index fedec74..0ab3dc4 100644 --- a/scripts/tests/test-telemetry.py +++ b/scripts/tests/test-telemetry.py @@ -13,12 +13,15 @@ ROOT = Path(__file__).resolve().parent.parent.parent class TelemetryTests(unittest.TestCase): def test_bash_record_disable_and_summary(self): bash = shutil.which('bash') + if os.name == 'nt': + candidate = Path(os.environ.get('ProgramFiles', 'C:/Program Files')) / 'Git/bin/bash.exe' + bash = str(candidate) if candidate.exists() else None if not bash: self.skipTest('Bash unavailable') with tempfile.TemporaryDirectory() as directory: root = Path(directory) script = root / 'scripts/commands/telemetry.sh' - script.parent.mkdir() + script.parent.mkdir(parents=True) shutil.copy(ROOT / 'scripts/commands/telemetry.sh', script) env = dict(os.environ, AI_CONFIG_TELEMETRY='1') result = subprocess.run([bash, str(script), 'record', 'subagent-stop', '--role', 'reviewer', '--filesRead', '3', '--outcome', 'findings'], env=env, capture_output=True, text=True)