Beta 5.6.5+ Unable to select Git Bash Terminal

The prompt under preferences exists but the dropdown has Git Bash greyed out and cannot be selected.

OS: Win 10
Git: 2.27.0.Windows.1
Local: 5.6.6

Example of WP-CLI command that does not work under windows basic prompt
wp post delete $(wp post list … --format=ids)

Ideal would be some form of command that I can run from VS Code terminal that would instantiate the Local/Lightning goodness to make that terminal able to execute when within a directory of the site (or where wp-cli.yml has been configured). Under Local 3.X this was possible through running the same .bat at what local itself ran.

Same with the recently released main app update to 5.6.6+4375

Hi Jamie,

Thanks for the heads-up! Local checks the following paths for Git Bash.

  • %ProgramW6432%\Git\git-bash.exe
  • %ProgramFiles%\Git\git-bash.exe

Is Git Bash installed in another location on your device?

There is a .sh file that gets generated now that’s adjacent to the .bat files. You should be able to execute it in VS Code as long as the terminal open in VS Code supports shell scripts.

It appears 2.19+ that change in the Git for Windows setup started.

YES! :star_struck:
For those who want to go this route without having to dig/remember deep paths to access this every time, I recommend:

One time

  • Start Local with only your current site running
  • Go to ~/AppData/Roaming/Local/ssh-entry/
  • Copy the filename/path for the only .sh that is currently listed
  • Go to your VS Code project workspace (same place that /app/public/ would contain your WP installation) and create with one line to execute the Local specific .sh file. Example
    “sh ~/AppData/Roaming/Local/ssh-entry/”

Any/Every time

  • Ensure your Local site is started
  • From your VS Code terminal run “sh” and the local script will run giving you WP-cli goodness!
    ** Optional: Add that script to your .bashrc or .bash_profile to have it execute anytime the VS Code terminal opens.*
1 Like

Correction to the ‘One time’ instructions…
Instead of looking for only .sh file listed (bullet #3), sort by date of last modification.

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.