Skip to content
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

Do not silently ignore typos in --url parameter #5716

Open
alekstrust opened this issue Dec 30, 2022 · 2 comments
Open

Do not silently ignore typos in --url parameter #5716

alekstrust opened this issue Dec 30, 2022 · 2 comments

Comments

@alekstrust
Copy link

I'm working in a multisite instance exporting and importing posts. At some point I realized the --url parameter had a missing / in the protocol and all posts were included in the primary blog.

This due to wp-cli ignoring the --url param without any notice if it's wrong.

It would be ideal to print some info of the site we are currently working on at the beginning of the output, and throw an error if the site in the given url does not exists.

@danielbachhuber
Copy link
Member

Thanks for the report, @alekstrust !

I suppose it'd probably be helpful to include some validation for --url=<url>, as long as we didn't cause too many explosions with it.

Feel free to submit a pull request, if you'd like!

@shubham07kb
Copy link

I am taking this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants