exit codes for `install` subcommands
strarsis opened this issue · comments
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
Provisioning tools as Ansible
can interpret the exit code for determining whether something was updated by the command.
Describe the solution you'd like
The install
subcommands should have different exit codes: Whether language files were updated or not and nothing was changed.
The
install
subcommands should have different exit codes: Whether language files were updated or not and nothing was changed.
Which exit codes would you suggest?
Related wp-cli/wp-cli#3577
0
for success and something was updated/changed.1
for error/problems.2
for success and nothing was updated/changed (e.g. was already up-to-date).
After some thought about it, I got doubts about using exit codes for this. Maybe just check for what the command printed, e.g. is an "updated" line there or not to find out whether something was updated or not.
Maybe just check for what the command printed, e.g. is an "updated" line there or not to find out whether something was updated or not.
@strarsis Oh, to clarify: are you suggesting a change to wp core install
or wp language core install
?
Mainly to language installs. When the language was already installed, and nothing changed. Or should be updated but was already up-to-date.
@strarsis I think we should be consistent with the behavior for the other * install
commands. I don't recall exactly what they are, however. Want to look into that?