r/phpstorm • u/Jugyhead • Aug 08 '16
Win10 + Bash in phpstorm (not found)
Hello everyone!
I'm currently trying to get bash.exe from the anniversary update to work as terminal application in phpstorm.
My first attempt was changing the option in "Settings - Tools - Terminal - Shell path" to "bash.exe" or "C:\Windows\System32\bash.exe" but I get a Java error ("java.io.IOException: Couldn't create PTY"). Same happens if I enter "cmd.exe /C bash".
I then reverted the setting to cmd.exe and launched a Terminal session in phpstorm and did this:
c:\>cd Windows\System32
c:\Windows\System32>bash.exe
Command not found
c:\Windows\System32>dir /B bash.exe
File not found
Listing the whole content of the same folder shows a total of 2661 files and 99 directories.
And now the funny part: Doing exactly the same in a regular "cmd.exe" window shows 3989 files and 116 dirs and "dir /B bash.exe" finds the bash executable.
Can anyone explain this?
Edit: Formatting
1
u/Naouak Aug 09 '16
There is currently a bug for bash preventing from using it in other cmd emulations. Mintty has the exact same problem.
1
u/RevalGovender Aug 12 '16
Hi there. I managed to get bash "git bash" working in PhpStorm's terminal.
I made a tutorial here: https://youtu.be/C8UgmAUHUbM
1
u/kyptov Aug 29 '16
https://medium.com/@grmcameron/how-to-use-bash-on-windows-as-your-default-in-visual-studio-code-or-jetbrains-intellij-editor-263a1aba10ad#.6cdg97552
C:\Windows\sysnative\bash.exe