Varying-Vagrant-Vagrants/VVV — pull request #370 by francescolaffi (2014-05-24 14:45:01+00:00)
Title: Always run wp-cli as vagrant user when provisioning with root

wp-cli doesn't allow running commands with root since few months ago, the solution was to add the --allow-root flag to all wp-cli commands in provision (see 0e01f9ec08)

I propose instead to remove the --allow-root and add the alias `wp() { sudo -H -u vagrant -- wp $@; }` in `provision.sh`, that would be applied also to the sites vvv-init.sh if they are run by sourcing instead of forking a new shell

The reason is both for convenience and also the use of --allow-root is discouraged from wp-cli docs in favor of running as the actual user. See also issues #271 #299, vvv-demo-* are not updated to reflect the wp-cli change so they don't work out of the box

If maintainers agree with the idea I'll make the pull request