Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ def test_install_sh_is_lf_and_parses(self):
if bash is None:
self.skipTest("bash is not on PATH")
result = subprocess.run([bash, "-n", "install.sh"], cwd=ROOT, capture_output=True, text=True)
if result.returncode != 0 and "distribution" in (result.stdout + result.stderr).lower():
self.skipTest("bash on PATH is an empty WSL launcher")
diagnostic = (result.stdout + result.stderr).lower()
empty_wsl = "distribution" in diagnostic or (
"wsl" in diagnostic and "execvpe(/bin/bash) failed" in diagnostic and
"no such file or directory" in diagnostic
)
if result.returncode != 0 and empty_wsl:
self.skipTest("bash on PATH is a WSL launcher with no usable Linux shell")
self.assertEqual(result.returncode, 0, result.stderr)

@unittest.skipUnless(WINDOWS, "install.cmd is Windows only")
Expand Down
Loading