Skip to content

Commit 76e39f5

Browse files
committed
Merge remote-tracking branch 'origin/topic/timw/fix-windows-shell-lookup'
* origin/topic/timw/fix-windows-shell-lookup: Enforce using the right bash.exe on Windows
2 parents 9ab2c72 + f01fdfa commit 76e39f5

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.2-2 | 2025-01-21 09:08:38 -0700
2+
3+
* Enforce using the right bash.exe on Windows (Tim Wojtulewicz)
4+
15
1.2 | 2024-12-10 14:36:06 -0700
26

37
* Fix formatting of output when threading (Tim Wojtulewicz, Corelight)

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
..
33
.. Version number is filled in automatically.
44

5-
.. |version| replace:: 1.2
5+
.. |version| replace:: 1.2-2
66

77
==================================================
88
BTest - A Generic Driver for Powerful System Tests

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2
1+
1.2-2

btest

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ else:
5656
import multiprocessing.managers as mp_managers
5757
import multiprocessing.sharedctypes as mp_sharedctypes
5858

59-
VERSION = "1.2" # Automatically filled in.
59+
VERSION = "1.2-2" # Automatically filled in.
6060

6161
Name = "btest"
6262
Config = None
@@ -228,7 +228,10 @@ def _build_win_subprocess_cmd_script(cmd, tmpdir=None):
228228
tf.write(fcontents)
229229
tf.flush()
230230

231-
bash_cmd = ["bash.exe", "-c", normalize_path(tf.name)]
231+
# If you have Windows 11 and WSL2, it defaults to calling "Microsoft Bash Launcher"
232+
# even if gitbash is in your path first. Who knows why. Using shutil.which here
233+
# forces it to call the right thing.
234+
bash_cmd = [shutil.which("bash.exe"), "-c", normalize_path(tf.name)]
232235
return tf, bash_cmd
233236

234237

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
py_modules = ["btest-sphinx"]
66

77
setup(
8-
version="1.2", # Filled in automatically.
8+
version="1.2.dev2", # Filled in automatically.
99
py_modules=py_modules,
1010
)

0 commit comments

Comments
 (0)