start/setup/update.sh: refuse to run on a Windows-hosted shell
A Windows user running the bash helper scripts (WSL, or Git Bash / MSYS2 / MinGW / Cygwin) used to fail deep in the venv/PC-SC logic - under WSL the Linux guest cannot reach the Windows PC/SC readers, and a mingw/msys shell has the wrong (bin/) venv layout. Each helper now detects Windows (WSL via /proc/version, mingw/msys/cygwin via uname -s) up front and exits 2 with a pointer at the matching .bat script. Users who deliberately want the WSL/Cygwin flow can run the underlying commands directly, without the helpers. Bumps VERSION to 3.40.4 and the SW cache to simple-v490.
This commit is contained in:
1 parent
9db3fd4262
commit
c4b64788b0
10 files changed
+73
-4
No files matched your search
@@ -165,6 +165,18 @@ class SourcePins(unittest.TestCase):
|
||||
self.assertIn('%HTTP_HOST%:%HTTP_PORT%', src)
|
||||
self.assertNotIn('http://127.0.0.1:8080', src)
|
||||
|
||||
def test_the_start_script_guards_windows_and_points_to_start_bat(self):
|
||||
src = (Path(m.__file__).parent.parent / 'start.sh').read_text()
|
||||
self.assertIn('microsoft /proc/version', src)
|
||||
self.assertIn('MINGW|MSYS|CYGWIN', src)
|
||||
self.assertIn('Use start.bat from a Windows command prompt', src)
|
||||
|
||||
def test_the_update_script_guards_windows_and_points_to_update_bat(self):
|
||||
src = (Path(m.__file__).parent.parent / 'update.sh').read_text()
|
||||
self.assertIn('microsoft /proc/version', src)
|
||||
self.assertIn('MINGW|MSYS|CYGWIN', src)
|
||||
self.assertIn('Use update.bat from a Windows command prompt', src)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user