dbux: [Bug] dbux is assuming `bash` in Windows resolves to MINGW/MSYS bash
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
- Make sure WSL is installed
- Open some JavaScript file and click “Start DBux”
- 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.
Attachments
Screenshots

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.)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 27 (27 by maintainers)
Commits related to this issue
- make all executable paths configurable #705 — committed to Domiii/dbux by Domiii 2 years ago
- new shell handling #705 — committed to Domiii/dbux by Domiii 2 years ago
- hackfix around volta bug #705 — committed to Domiii/dbux by Domiii 2 years ago
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.)
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.
@CherryDT Good news. After you helped us understand how wrong our assumptions were about
bashonwindows, I realized that there will definitely be a good amount of people who would be hampered by this issue. Also, in previous experiments, gettingbashright was definitely an issue that slowed people down. That is why I decided today to just rip the bandage off and get this done.In the process, we had to discover and tussle with this volta bug - cross-platform dev is such fun!
Either way - I finished the “use
cmdon windows” solution today, will test more, and then deploy in the next few days!OK yes if you do that, it does, but it’s not recommended because it overwrites other tools like
find. Also, if you use the “modern way” Windows provides for a while, using Windows’ built-in package manager WinGet, you won’t get asked. (Note that even the Git download page shows the WinGet command line you can use.)Update: Actually, I realized now, it does not work correctly in a WSL window, because now it seems to use the custom path I set in the regular VSCode window also for the WSL window, so while it initally uses the right
bashit then passes the Windows path that I set into the script…Something doesn’t make sense here - in the WSL tab of the settings it shows
bashbut “modified in: User”, while in the User tab it shows my Windows path - however in a regular VSCode window that User tab is the only place I can change it, so I’m stuck again…How can I make it work correctly in both regular and WSL windows in VSCode?
Another thing I noticed: I saw a connection error in the terminal, but dbux then apparently issued another (different) command even though the first one failed - shouldn’t this abort the operation entirely?
Also, I noticed when I click “Start DBux” it goes to a screen that looks like it already started, even when it’s not ready yet. If the commands then fail, the only way to go back to the previous screen with “Start DBux” on it is to reload the window…