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

install-wp-tests.sh could not be found when running wp scaffold plugin-tests #126

Closed
micron opened this issue Feb 19, 2018 · 3 comments
Closed

Comments

@micron
Copy link

micron commented Feb 19, 2018

php wp --info output:

OS:	Linux 4.9.60-linuxkit-aufs #1 SMP Mon Nov 6 16:00:12 UTC 2017 x86_64
Shell:
PHP binary:	/usr/local/bin/php
PHP version:	7.0.14
php.ini used:
WP-CLI root dir:	phar://wp-cli.phar
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/var/www/html
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version:	1.5.0

php wp cli version output:

WP-CLI 1.5.0

php -v output:

PHP 7.0.14 (cli) (built: Jan 17 2017 19:30:34) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.14, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

When trying to scaffold the plugin tests I always get the error

Error: Couldn't find install-wp-tests.sh

Command which is executed:

php wp --allow-root --debug --path=/var/www/html/wp scaffold plugin-tests some-plugin

Output:

Debug (bootstrap): No readable global config found (0.326s)
Debug (bootstrap): No project config found (0.328s)
Debug (bootstrap): argv: ./wp/wp --allow-root --debug --path=/var/www/html/wp scaffold plugin-tests some-plugin (0.329s)
Debug (bootstrap): ABSPATH defined: /var/www/html/wp/ (0.329s)
Debug (bootstrap): Begin WordPress load (0.335s)
Debug (bootstrap): wp-config.php path: /var/www/html/wp/wp-config.php (0.337s)
Debug (bootstrap): Loaded WordPress (3.716s)
Debug (bootstrap): Running command: scaffold plugin-tests (3.717s)
Error: Couldn't find install-wp-tests.sh

Did I miss something with the wp-cli installation?

@gitlost
Copy link
Contributor

gitlost commented Feb 19, 2018

This is almost certainly the same bug as wp-cli/wp-cli#4689. Could you try moving your WP-CLI phar from /var/www/html/wp to a directory in your PATH, eg /usr/local/bin, or alternatively rename it to wp.phar?

@micron
Copy link
Author

micron commented Feb 19, 2018

Ok, I can confirm that renaming wpto wp.phar fixes this issue.

Thanks

@gitlost
Copy link
Contributor

gitlost commented Feb 19, 2018

Thanks for the feedback @micron and the report. Will close this in favour of wp-cli/wp-cli#4689.

@gitlost gitlost closed this as completed Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants