mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Run bundled wp-cli if stdout is file or pipe
This commit is contained in:
parent
35653eec54
commit
60ef965ee8
1 changed files with 8 additions and 1 deletions
|
@ -61,12 +61,19 @@ if [ ! -f "/usr/local/bin/wp" ] || [ ! -f "/usr/local/bin/wp-cli/php/boot-fs.php
|
|||
/usr/local/vesta/bin/v-install-wp-cli
|
||||
fi
|
||||
|
||||
output='terminal'
|
||||
if [ -t 1 ]; then
|
||||
output='terminal'
|
||||
else
|
||||
output='file'
|
||||
fi
|
||||
|
||||
if [ -f "/usr/local/bin/wp" ]; then
|
||||
wpcli="/usr/local/bin/wp"
|
||||
WP_CLI_PACKAGES_DIR=""
|
||||
fi
|
||||
|
||||
if [ -f "/usr/local/bin/wp-cli/php/boot-fs.php" ] && [ -d "/usr/local/bin/wp-cli/packages/vendor/wp-cli/search-replace-command" ] && [ -z "$USE_WP_CLI_BUNDLED" ]; then
|
||||
if [ -f "/usr/local/bin/wp-cli/php/boot-fs.php" ] && [ -d "/usr/local/bin/wp-cli/packages/vendor/wp-cli/search-replace-command" ] && [ -z "$USE_WP_CLI_BUNDLED" ] && [ "$output" == "terminal" ]; then
|
||||
wpcli="/usr/local/bin/wp-cli/php/boot-fs.php"
|
||||
COLUMNS=$(/usr/bin/env stty size 2>/dev/null | awk '{print $2}')
|
||||
echo $COLUMNS > /usr/local/bin/wp-cli/COLUMNS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue