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

No output from wp-enforcer setup script #28

Closed
brandoncamenisch opened this issue Dec 16, 2015 · 2 comments
Closed

No output from wp-enforcer setup script #28

brandoncamenisch opened this issue Dec 16, 2015 · 2 comments
Labels

Comments

@brandoncamenisch
Copy link

When running the install script on OS X 10.11.1 I get no output from the shell script. It also replaces the pre-commit hook file entirely without asking.

screenshot 2015-12-16 23 40 01

Here is a debug output of the script:

+ readonly VERSION=0.4.0
+ VERSION=0.4.0
+++ dirname ./vendor/bin/wp-enforcer
++ cd ./vendor/bin
++ pwd -P
+ readonly BIN=/Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/vendor/bin
+ BIN=/Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/vendor/bin
+++ readlink ./vendor/bin/wp-enforcer
++ dirname ../stevegrunwell/wp-enforcer/bin/wp-enforcer
+ readonly DIR=/Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/vendor/bin/../stevegrunwell/wp-enforcer/bin
+ DIR=/Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/vendor/bin/../stevegrunwell/wp-enforcer/bin
++ pwd
+ readonly PROJECT=/Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data
+ PROJECT=/Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data
+ vip=false
++ getopt -o h,v -l help,version,vip --
+ options=' -- h,v -l help,version,vip --'
+ '[' 0 -gt 0 ']'
+ echo 'Installing WP Enforcer...'
Installing WP Enforcer...
+ [[ ! -d /Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/.git ]]
+ [[ ! -d /Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/.git/hooks ]]
+ [[ -f /Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/.git/hooks/pre-commit ]]
+ cmp /Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/vendor/bin/../stevegrunwell/wp-enforcer/bin/hooks/pre-commit /Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/.git/hooks/pre-commit
+ echo 'pre-commit hook already exists, skipping'
pre-commit hook already exists, skipping
+ [[ ! -f /Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/phpcs.xml ]]
++ /Users/brandoncamenisch/Sites/Vagrants/vvv/www/ten/wordpress/wp-content/plugins/vehicle-data/vendor/bin/phpcs --config-show
++ grep installed_paths:
+ installed_paths='installed_paths: ../../wp-coding-standards/wpcs'
+ [[ installed_paths: ../../wp-coding-standards/wpcs != \i\n\s\t\a\l\l\e\d\_\p\a\t\h\s\:\ \.\.\/\.\.\/\w\p\-\c\o\d\i\n\g\-\s\t\a\n\d\a\r\d\s\/\w\p\c\s ]]
+ echo

+ echo 'WP Enforcer installed successfully!'
WP Enforcer installed successfully!
+ exit 0
@stevegrunwell
Copy link
Owner

The installation script only installs the Git hook and copies over the pre-commit hook, the actual execution is run on pre-commit (or optionally via ./vendor/bin/phpcs).

Overwriting the existing Git hook isn't good, however, so we'll take a look into that.

@ghost
Copy link

ghost commented May 20, 2017

Overwriting the existing Git hook isn't good, however, so we'll take a look into that.

I don't see why this would be considered a bug. Current behavior shows that it will not overwrite existing pre-commit scripts and that's the behavior one would expect. There is clear output from the command showing when the file changes are skipped, and therefore I do not believe this should be a bug but perhaps instead a documentation or training issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants