Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(noroot): on utilities #2392

Merged
merged 1 commit into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion provision/core/composer/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function composer_setup() {
chmod +x "composer.phar"
mv "composer.phar" "/usr/local/bin/composer"
vvv_info " * Forcing composer to v1.x"
composer selfupdate --1
noroot composer selfupdate --1
vvv_success " * Composer installer steps completed"
fi

Expand Down
10 changes: 5 additions & 5 deletions provision/core/phpcs/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ function php_codesniff_setup() {
vvv_info " * Upgrading from old PHPCS setup"
rm -rf /srv/www/phpcs
fi

# PHP_CodeSniffer (for running WordPress-Coding-Standards)
# Sniffs WordPress Coding Standards
vvv_info " * Provisioning PHP_CodeSniffer (phpcs), see https://github.com/squizlabs/PHP_CodeSniffer"

noroot mkdir -p /srv/www/phpcs
cd /srv/www/phpcs
COMPOSER_BIN_DIR="bin" noroot composer require --update-with-all-dependencies "dealerdirect/phpcodesniffer-composer-installer" "wp-coding-standards/wpcs" "automattic/vipwpcs" "phpcompatibility/php-compatibility" "phpcompatibility/phpcompatibility-paragonie" "phpcompatibility/phpcompatibility-wp" --no-ansi --no-progress

vvv_info " * Symlinking phpcs and phcbf into /usr/local/bin"

# Link `phpcbf` and `phpcs` to the `/usr/local/bin` directory so
# that it can be used on the host in an editor with matching rules
ln -sf "/srv/www/phpcs/bin/phpcbf" "/usr/local/bin/phpcbf"
ln -sf "/srv/www/phpcs/bin/phpcs" "/usr/local/bin/phpcs"
noroot ln -sf "/srv/www/phpcs/bin/phpcbf" "/usr/local/bin/phpcbf"
noroot ln -sf "/srv/www/phpcs/bin/phpcs" "/usr/local/bin/phpcs"

vvv_info " * Setting WordPress-Core as the default PHPCodesniffer standard"

# Install the standards in PHPCS
Expand Down
4 changes: 2 additions & 2 deletions provision/core/wp-cli/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ function wp_cli_setup() {
chown vagrant /srv/config/wp-cli/wp-completion.bash
else
vvv_info " * Updating wp-cli..."
wp --allow-root cli update --nightly --yes
noroot wp cli update --nightly --yes
vvv_success " * WP CLI Nightly updated"
fi

if [ "${VVV_DOCKER}" != 1 ]; then
vvv_info " * Installing WP CLI doctor sub-command"
wp --allow-root package install [email protected]:wp-cli/doctor-command.git
noroot wp package install [email protected]:wp-cli/doctor-command.git
vvv_info " * Installed WP CLI doctor sub-command"
fi
}
Expand Down