Closed gbouteiller closed 7 years ago
Unfortunately I'm not familiar with Ansible, are you sure there is no way to try/catch the exit(1)
emitted by WP_CLI::error()
?
What about using wp term list language --format=count
?
Yes there is and I can force the next tasks even if there is an error. But don't you think that it is consistent to have 0 on stdout when requesting wp pll lang list --format =count
instead of an error? As it should be consistent with wp term list language --format=count
?
absolutely!
Hello @diggy, As I told you in a different post, I use your package with Ansible. The problem that I encounter is that If I run
wp pll lang delete --all
orwp pll lang list --format=count
, I get an error. In my ansible task, I would like to delete languages if they exist before adding other languages. So would it be possible to have a flag to perform a delete even if there are no languages or at least return 0 instead of an error if I try to list the languages with format=count ?