-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WP CLI: environment variables not set #359
Comments
I am on Mac, I will let you triage this one, @wojtekn |
I am a mac user as well. @wojtekn were you able to take a look at this? |
@mrfoxtalbot @peterbutler I validated and confirmed this issue:
When I open a new terminal tab and run |
This may not be directly related to the problem reported here, but I had a problem when trying to get WP-CLI to work in Studio. Here's how I solved it, but I hope it helps someone. PHP and WP-CLI already work on Windows OS:
When I opened the terminal from the Studio app and ran
So I edited
By doing this, WP-CLi worked in Studio:
|
Quick summary
I want to use WP CLI on Windows. When I open a shell by clicking Studio's 'Terminal' button, the environment variables needed to run WP CLI are not set correctly.
Steps to reproduce
wp user list
What you expected to happen
WP CLI should launch and execute the desired command
What actually happened
because PATH is not set correctly, the
wp
command is not found. Also, in order to successfully executeC:\Users\[username]\AppData\Local\studio\app-1.0.5\resources\bin\wp.bat
, the variableSTUDIO_APP_PATH
must be set.Impact
Some (< 50%)
Available workarounds?
Yes, easy to implement
Platform
Windows
Logs or notes
A possible workaround is to:
STUDIO_APP_PATH
toC:\Users\[username]\AppData\Local\studio\app-1.0.5\Studio.exe
PATH
to includeC:\Users\[username]\AppData\Local\studio\app-1.0.5\resources\bin
The text was updated successfully, but these errors were encountered: