Skip to content

Commit 16cd70d

Browse files
committed
update install script
1 parent 349308c commit 16cd70d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

install

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)