We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bd0589 commit 1d8fcbcCopy full SHA for 1d8fcbc
1 file changed
bin/v-add-user-wp-cli
@@ -43,8 +43,8 @@ check_hestia_demo_mode
43
WPCLI_DIR="/home/$user/.wp-cli"
44
WPCLI_BIN="$WPCLI_DIR/wp"
45
46
-if [ -f "$WPCLI_DIR" ]; then
47
- echo "WP-CLI already available"
+if [ -f "$WPCLI_BIN" ]; then
+ check_result "$E_EXISTS" "For user name '$user' WP-CLI already available!"
48
exit
49
fi
50
@@ -56,6 +56,7 @@ chown $user:$user "$WPCLI_DIR"
56
57
user_exec wget --tries=3 --timeout=15 --read-timeout=15 --waitretry=3 --no-dns-cache --quiet -O "$WPCLI_BIN" https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
58
user_exec chmod +x "$WPCLI_BIN"
59
+user_exec echo -e "#add wp-cli alias for user\nalias wp='php $WPCLI_BIN'" >> ~/.bashrc
60
61
#----------------------------------------------------------#
62
# Hestia #
0 commit comments