Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2784e40

Browse files
committed
Show bash and other WSL-relevant info but not PATH
Only on native Windows systems (since this is for debugging WSL).The Windows CI runners have WSL itself installed but no WSL systemsinstalled. So some of these commands may fail if they call thebash.exe in the System32 directory, but this should still beilluminating. Results after a WSL system is set up will likely bemore important, but doing this first allows for comparison.The reason PATH directories are no longer listed is to decreasenoise.
1 parentad07ecb commit2784e40

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

‎.github/workflows/cygwin-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ jobs:
7373
python -c 'import sys; print(sys.platform)'
7474
python -c 'import os; print(os.name)'
7575
python -c 'import git; print(git.compat.is_win)' # NOTE: Deprecated. Use os.name directly.
76-
printenv PATH | tr ':' '\n'
7776
7877
-name:Test with pytest
7978
run:|

‎.github/workflows/pythonpackage.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,27 @@ jobs:
6565
python -c 'import sys; print(sys.platform)'
6666
python -c 'import os; print(os.name)'
6767
python -c 'import git; print(git.compat.is_win)' # NOTE: Deprecated. Use os.name directly.
68-
printenv PATH | tr ':' '\n'
68+
69+
# For debugging hook tests on native Windows systems that may have WSL.
70+
-name:Show where bash.exe may be found
71+
if:startsWith(matrix.os, 'windows')
72+
run:|
73+
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}")'
88+
continue-on-error:true
6989

7090
-name:Check types with mypy
7191
run:|

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp