I’m looking at wp-cli support via v-add-user-wp-cli jsmith
But it looks like the line in the v-add-user-wp-cli:
user_exec echo -e "#add wp-cli alias for user\nalias wp='php $WPCLI_BIN'" >> ~/.bashrc
Isn’t executing. I don’t see wp-cli being added to the user’s .bashrc file and the wp command isn’t working. Aliasing via
echo "alias wp=/home/"$user"/.wp-cli/wp" >> /home/$user/.bash_aliases
DOES work. This is more inline with the way the v-add-user-composer
support is implemented in Hestia; using alias and appending to the protected .bash_aliases file.
Further, it looks like the current .bashrc addition is redundant as php $WPCLI_BIN
is adding the php interpreter to the binary, which is already marked for execution and doesn’t need the php prefix.
Anyone else seeing this? You can remove wp-cli via rm -rf ~/.wp-cli
to re-add via v-add-user-wp-cli <username>
to check. Please confirm and I can add an issue and associated GitHub PR.
Regards,
Steve