Edex-ui: Can't use git bash as `settings.shell`

Created on 28 Jun 2019  Â·  5Comments  Â·  Source: GitSquared/edex-ui

Technical information

Using version:

  • [ ] master (running from GitHub-published source code, currently v3.0.0-pre)
  • [x] latest (latest release, currently v2.2.2)
  • [ ] vX.X.X (specify other version)

Running on:

  • [ ] Linux
  • [x] Windows
  • [ ] macOS

How comfortable you are with your system and/or IT in general:

  • [ ] I'm kind of lost, honestly
  • [ ] I know what's up, I could help you run some commands or checks
  • [x] My machine is fully under my control, tell me what you need
  • [ ] I attended Defcon last year

Can't use git bash as settings.shell.

settings.js:2

{
    "shell": "C:\\Program Files\\Git\\bin\\bash.exe"
}

Getting started from cmd:

√  success   Settings loaded!
[ ]  pending   Creating new terminal process on port 3000
(node:20732) UnhandledPromiseRejectionWarning: Error: File not found: C:\Program
    at new WindowsPtyAgent (C:\Users\K\AppData\Local\Programs\edex-ui\resources\app.asar\node_modules\node-pty\lib\windowsPtyAgent.js:53:36)
    at new WindowsTerminal (C:\Users\K\AppData\Local\Programs\edex-ui\resources\app.asar\node_modules\node-pty\lib\windowsTerminal.js:49:24)
    at Object.spawn (C:\Users\K\AppData\Local\Programs\edex-ui\resources\app.asar\node_modules\node-pty\lib\index.js:29:12)
    at new Terminal (C:\Users\K\AppData\Local\Programs\edex-ui\resources\app.asar\classes\terminal.class.js:1:8188)
    at App.app.on (C:\Users\K\AppData\Local\Programs\edex-ui\resources\app.asar\_boot.js:181:11)

in 2.2.2 release, in _boot.js:181

settings.shell.split(" ")[0]

in master: f1dbf08, in _boot.js:175

let cleanEnv = await require("shell-env")(settings.shell.split(" ")[0]).catch(e => { throw e; });
bug investigation

Most helpful comment

@GitSquared That's it!
I got it to work just fine by using "C:\Git\bin\bash.exe" in the shell parameter.
Thanks for the help and for being so responsive! This project is amazing.

All 5 comments

As it seems like you've figured out, the settings parser does not support spaces in the path of the desired shell program.

It's designed to automatically find the right path without needing to write it by hand, though, so the following should work:

{
    "shell": "bash.exe"
}

Closing this as inactive. Feel free to reopen if suggested solution doesn't work.

I am also having this issue. I have attempted to use "bash.exe" and "git-bash.exe" for the shell parameter but it fails to launch.

I then moved the git-bash installation folder to the C: drive to eliminate the spaces in the path, then used the whole path in the shell parameter. When I launch eDEX, git-bash launches first, then eDEX does. At that point, eDEX's terminal function is inop and git-bash operates on its own independently. Thoughts?

@J-Nistler Looks like the path you specified is for git-bash's GUI wrapper, not the included actual bash clone.

@GitSquared That's it!
I got it to work just fine by using "C:\Git\bin\bash.exe" in the shell parameter.
Thanks for the help and for being so responsive! This project is amazing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdgza picture bdgza  Â·  3Comments

probonopd picture probonopd  Â·  4Comments

mkbcaptain picture mkbcaptain  Â·  3Comments

GitSquared picture GitSquared  Â·  6Comments

kingfengji picture kingfengji  Â·  4Comments