test(reset): select a working Bash instead of an unusable WSL launcher (#671)

* test(reset): probe Bash variable expansion on Windows

Use a bounded variable-expansion probe so a launcher that starts successfully but consumes $x is rejected. Rebase over #676 and keep its upstream-checkout guard alongside Bash discovery.

Thanks to MadsLorentzen for diagnosing the launcher expansion failure and verifying the stronger probe.

* changelog: place the #671 entry under [Unreleased]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Mads Lorentzen <madslorentzen_17@hotmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-10-20 17:26:53 +02:00
1 parent 64a6c90ec3
commit 215dfb5af9
5 files changed
+118 -3

No files matched your search

+3 -2
View File
@@ -28,21 +28,22 @@ tree, the profile files from /setup Step 3's own headings - so a new drop
folder or a new /setup target fails this test until /reset covers it.
"""
import re
import shutil
import subprocess
import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
try:
from tests._bash import find_bash
from tests._upstream import is_upstream_checkout
except ImportError: # `python -m unittest discover -s tests` imports test modules top-level
from _bash import find_bash
from _upstream import is_upstream_checkout
REPO = Path(__file__).resolve().parent.parent
RESET = REPO / ".claude" / "commands" / "reset.md"
SETUP = REPO / ".claude" / "commands" / "setup.md"
BASH = shutil.which("bash")
BASH = find_bash()
def tracked_document_subfolders():