The prompt under preferences exists but the dropdown has Git Bash greyed out and cannot be selected.
OS: Win 10
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
Thanks for the heads-up! Local checks the following paths for Git Bash.
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.
For those who want to go this route without having to dig/remember deep paths to access this every time, I recommend:
- 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 ssh.sh with one line to execute the Local specific .sh file. Example
- Ensure your Local site is started
- From your VS Code terminal run “sh ssh.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.*
Correction to the ‘One time’ instructions…
Instead of looking for only .sh file listed (bullet #3), sort by date of last modification.
This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.