mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
v-fix-wordpress-core: support for custom PHP version
This commit is contained in:
parent
a976a3bc3f
commit
9eade5a7df
1 changed files with 6 additions and 1 deletions
|
@ -37,7 +37,12 @@ TMP_DIR="$(mktemp -d /tmp/wpfix.XXXXXX)" # temp workspace
|
|||
trap 'rm -rf "$TMP_DIR"' EXIT
|
||||
|
||||
# 1etermine WP version
|
||||
WP_VERSION="$(/usr/local/vesta/bin/v-run-wp-cli "$DOMAIN" core version | tr -d '[:space:]')"
|
||||
if [ -z "$PHP" ]; then
|
||||
WP_VERSION="$(/usr/local/vesta/bin/v-run-wp-cli "$DOMAIN" core version | tr -d '[:space:]')"
|
||||
else
|
||||
WP_VERSION="$(PHP=$PHP /usr/local/vesta/bin/v-run-wp-cli "$DOMAIN" core version | tr -d '[:space:]')"
|
||||
fi
|
||||
|
||||
check_result $? "cannot detect WP version" > /dev/null
|
||||
if [ -z "$WP_VERSION" ]; then
|
||||
check_result 1 "empty WP version string"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue