Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 848 forks source link

Test WP CLI after install #2164

Open tomjn opened 4 years ago

tomjn commented 4 years ago

Is your feature request related to a problem? Please describe.

If a broken WP CLI is downloaded, VVV continues until a site provisioner tries to use WP CLI and fails

Describe the solution you'd like

When WP CLI is installed/update, run a WP CLI command such as the version subcommand, and check it worked okay

Additional context

Related to #2163

Mte90 commented 4 years ago

I am wondering how we can reproduce it, maybe check if the output start with a specific string otherwise is broken?

tomjn commented 4 years ago

We should always check the return code first as that's the standard method, if it fails despite giving a good return code then we can check the output

Mte90 commented 4 years ago

Wondering if we need a similar method for all the tools that we are downloading.
Looking at provision.sh are:

With a single method (easy to test) we can avoid problems also with those.

tomjn commented 4 years ago

most likely, though we'd need separate commands to test