Skip to content

Commit 8c43225

Browse files
authored
Fix v-add-user-wp-cli (hestiacp#4002)
Bug, currently does NOT write to user folder. Fixed to alias wp using user's protected .bash_aliases. This is how Hestia does composer (which does work). Also removes php prefix, as "wp" is already an executable. See HesitaCP forum for discussion. https://forum.hestiacp.com/t/10983
1 parent 319e874 commit 8c43225

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-add-user-wp-cli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ chown $user:$user "$WPCLI_DIR"
5656

5757
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
5858
user_exec chmod +x "$WPCLI_BIN"
59-
user_exec echo -e "#add wp-cli alias for user\nalias wp='php $WPCLI_BIN'" >> ~/.bashrc
59+
echo "alias wp=/home/"$user"/.wp-cli/wp" >> /home/$user/.bash_aliases
6060

6161
#----------------------------------------------------------#
6262
# Hestia #

0 commit comments

Comments
 (0)