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

exit codes for install subcommands #114

Open
1 task done
strarsis opened this issue Jul 31, 2022 · 5 comments
Open
1 task done

exit codes for install subcommands #114

strarsis opened this issue Jul 31, 2022 · 5 comments

Comments

@strarsis
Copy link

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.

@danielbachhuber
Copy link
Member

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

@strarsis
Copy link
Author

strarsis commented Aug 4, 2022

  • 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.

@danielbachhuber
Copy link
Member

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 ?

@strarsis
Copy link
Author

Mainly to language installs. When the language was already installed, and nothing changed. Or should be updated but was already up-to-date.

@danielbachhuber
Copy link
Member

@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?

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