-
Notifications
You must be signed in to change notification settings - Fork 998
Improve support for cases with empty --path provided to wp-cli commands #5709
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wojtekn !
Can you write some functional tests for this change?
The handbook is editable if there are improvements you identify.
@danielbachhuber that is good idea, I've added functional tests for three cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
I propose fixing the confusing messaging we show if an empty
--path
parameter is provided to command calls.The empty parameter is considered a
true
flag, let's treat it as empty path:This is also an empty parameter considered a
true
flag because there is no equal sign used to assign a path to the parameter. Let's treat it as an empty path too:Then handle an empty string as an empty path:
When a non-empty path is provided, include the full working directory in the error message:
Fixes: #5559