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

Add --format flag to language core|plugin|theme #88

Open
RoundAboutWEB opened this issue Sep 5, 2019 · 4 comments
Open

Add --format flag to language core|plugin|theme #88

RoundAboutWEB opened this issue Sep 5, 2019 · 4 comments

Comments

@RoundAboutWEB
Copy link

grafik

All update commands for language files with "- json" generate an error.

wp language core update --dry-run --json
wp language plugin update --all --dry-run --json
wp language theme update --all --dry-run --json
wp language core update --json
wp language plugin update --all --json
wp language theme update --all --json
@schlessera
Copy link
Member

There's two things happening here:
a.) --json is a deprecated flag that was later replaced by the more generic --format=json, as we also support other formats by now. WP-CLI automatically turns --json into --format=json for backward compatibility.
b.) The above three commands don't support a --format flag, so the error just tells you that you're using an unknown flag for these commands.

So the behavior of WP-CLI is correct here, even if it might be slightly misleading due to backward compatibility logic.

As to whether we would want to add --format support to these commands, it would help to know what specific use case you are trying to solve.

@schlessera schlessera transferred this issue from wp-cli/wp-cli Sep 9, 2019
@RoundAboutWEB
Copy link
Author

json is needed to see if any updates are pending

@RoundAboutWEB
Copy link
Author

Is there any hope that this case (reported September 2019) will be handled?

@schlessera schlessera changed the title Bug with --json Add --format flag to language core|plugin|theme Jul 8, 2020
@schlessera
Copy link
Member

It is not a current priority.

Are you interested in looking into this for creating a PR? If so, I'm happy to assist you in whatever way I can to get this implemented.

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

2 participants