| 
35 | 35 |         python-version: ${{ matrix.python-version }}  | 
36 | 36 |         allow-prereleases: ${{ matrix.experimental }}  | 
37 | 37 | 
 
  | 
 | 38 | +    - name: Set up WSL (Windows)  | 
 | 39 | +      if: startsWith(matrix.os, 'windows')  | 
 | 40 | + | 
 | 41 | +      with:  | 
 | 42 | +        distribution: Debian  | 
 | 43 | + | 
38 | 44 |     - name: Prepare this repo for tests  | 
39 | 45 |       run: |  | 
40 | 46 |         ./init-tests-after-clone.sh  | 
@@ -62,29 +68,15 @@ jobs:  | 
62 | 68 |         command -v git python  | 
63 | 69 |         git version  | 
64 | 70 |         python --version  | 
65 |  | -        python -c 'import sys; print(sys.platform)'  | 
66 |  | -        python -c 'import os; print(os.name)'  | 
67 |  | -        python -c 'import git; print(git.compat.is_win)'  # NOTE: Deprecated. Use os.name directly.  | 
 | 71 | +        python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'  | 
68 | 72 | 
  | 
69 | 73 |     # For debugging hook tests on native Windows systems that may have WSL.  | 
70 |  | -    - name: Show where bash.exe may be found  | 
 | 74 | +    - name: Show bash.exe candidates (Windows)  | 
71 | 75 |       if: startsWith(matrix.os, 'windows')  | 
72 | 76 |       run: |  | 
73 | 77 |         set +e  | 
74 |  | -        type -a bash.exe  | 
75 |  | -        python -c 'import shutil; print(shutil.which("bash.exe"))'  | 
76 |  | -        bash.exe --version  | 
77 |  | -        python -c 'import subprocess; p = subprocess.run(["bash.exe", "--version"]); print(f"result: {p!r}")'  | 
78 |  | -        bash.exe -c 'echo "$BASH"'  | 
79 |  | -        python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", """echo "$BASH" """]); print(f"result: {p!r}")'  | 
80 |  | -        bash.exe -c 'echo "$BASH_VERSION"'  | 
81 |  | -        python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", """echo "$BASH_VERSION" """]); print(f"result: {p!r}")'  | 
82 |  | -        bash.exe -c 'printenv WSL_DISTRO_NAME'  | 
83 |  | -        python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "printenv WSL_DISTRO_NAME"]); print(f"result: {p!r}")'  | 
84 |  | -        bash.exe -c 'ls -l /proc/sys/fs/binfmt_misc/WSLInterop'  | 
85 |  | -        python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "ls -l /proc/sys/fs/binfmt_misc/WSLInterop"]); print(f"result: {p!r}")'  | 
86 |  | -        bash.exe -c 'uname -a'  | 
87 |  | -        python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "uname -a"]); print(f"result: {p!r}")'  | 
 | 78 | +        bash.exe -c 'printenv WSL_DISTRO_NAME; uname -a'  | 
 | 79 | +        python -c 'import subprocess; subprocess.run(["bash.exe", "-c", "printenv WSL_DISTRO_NAME; uname -a"])'  | 
88 | 80 |       continue-on-error: true  | 
89 | 81 | 
 
  | 
90 | 82 |     - name: Check types with mypy  | 
 | 
0 commit comments