Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] dbux is assuming `bash` in Windows resolves to MINGW/MSYS bash

See original GitHub issue

Bug Report

Bug Summary dbux seems to assume that running bash in Windows will start some sort of MINGW/MSYS bash such as Git bash. However, by default, the only bash.exe in Windows will be the wrapper that launches /bin/bash in the default WSL distro (if WSL is enabled).

Steps To Reproduce

  1. Make sure WSL is installed
  2. Open some JavaScript file and click “Start DBux”
  3. See error in terminal

Expected behavior dbux should either not require a specific kind of bash installed at all or tell the user exactly what is expected and ask for its location if it’s not in PATH.

Actual behavior dbux launches bash which by default will by C:\Windows\System32\bash.exe (a helper to launch bash inside WSL). It then fails with a misleading file-not-found error message because it launches node from the shell which is now inside WSL and passes a Windows-style path to it.

The loading box [Dbux] : New version. Installing 1 library/ies (1-3 mins)... then stays there forever.


Screenshots image

System (please complete the following information):

  • OS: Windows 10
  • Dbux VSCode Extension version: 0.6.15

(I updated the bug description based on what the actual problem is, because my initial assumption was wrong.)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:27 (27 by maintainers)

github_iconTop GitHub Comments

CherryDTcommented, Mar 25, 2022

Thank you!

I just realized this probably (?) has nothing to do with my terminal shell being configured to WSL bash in particular, as I first assumed - instead it seems you simply invoke bash, which will be the Linux bash if WSL is installed on the system (which, in my opinion, is no edge case for a JavaScript developer nowadays).

I fixed the issue by changing the new bash path option to C:\Program Files\Git\bin\bash.exe.

(By the way: In a WSL window, running DBux works fine.)

CherryDTcommented, Mar 24, 2022

Ah I see what you mean (I didn’t realize it’s what’s used for running the code too, I thought it was just part of the installation process), yes if it’s configurable it should be fine.

Output channel log: sorry I (apparently wrongly) thought you meant what was already in the terminal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Volta breaks with child_process.exec in cmd (Windows) #1199
Volta breaks with child_process.exec in cmd (Windows) #1199 ... [Bug] dbux is assuming bash in Windows resolves to MINGW/MSYS bash ...
Read more >
Invoking MSYS bash from Windows cmd - Stack Overflow
I installed MSYS to be able to execute Make and compile using makefiles. However, it is tedious to every time start up the...
Read more >
1156 msys/bash command pipes not 8 bit clean - SourceForge
Using I/O redirection through pipes from rxvt/bash is not 8 bit ... at the bottom of other bug reports on strange pipe behaviour...
Read more >
Installation using MSYS2 and the MinGW Compilers
These instructions assume you are running on 64-bit Windows. ... When using the MinGW 32bit toolchain, the “MSYS MinGW 32-bit” shell must be...
Read more >
Using MSYS2 in CI
All you have to do is to provide a BASH script that runs your code in the MSYS2 environment. 1) Create a workflow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found