File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -228,12 +228,14 @@ function ee_update_wp_cli()
228228 ee_lib_echo " Updating WP-CLI version to resolve compatibility issue."
229229 PHP_PATH=$( which php)
230230 WP_CLI_PATH=$( which wp)
231-
232231 if [ " ${WP_CLI_PATH} " != " " ]; then
233232 # Get WP-CLI version
234233 WP_CLI_VERSION=$( ${PHP_PATH} ${WP_CLI_PATH} --allow-root cli version | awk ' { print $2 }' )
235- if [ " ${WP_CLI_VERSION} " -lt " 0.21.1" ]; then
236- echo " y" | ee stack upgrade --wpcli
234+ dpkg --compare-versions ${WP_CLI_VERSION} lt 0.21.1
235+ # Update WP-CLI version
236+ if [ " $? " == " 0" ]; then
237+ wget -qO ${WP_CLI_PATH} https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
238+ chmod +x ${WP_CLI_PATH}
237239 fi
238240 fi
239241}
You can’t perform that action at this time.
0 commit comments