JetBrains IDE on Windows: Execute run config with Git Bash

Viewed 139

How can I configure my JetBrains IDE (PhpStorm in my case) on Windows to execute run configurations with Git Bash instead of using the default Windows shell?

I've configured the terminal tool window to use Git Bash via Settings > Tools > Terminal, but there doesn't seem to be a way to force the Run window to use the same shell. So I can successfully run some commands that depend on tools like grep from the Terminal tool window but not via my run configurations.

To be clear, by run configurations I mean these:
enter image description here

2 Answers

You can set npm in general to use bash:

npm config set script-shell "$HOME\AppData\Local\Programs\Git\bin\sh.exe"
Related