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

Cannot pass options using a double dash to WP-CLI in 1.0.0-beta.1 #1505

Closed
ataylorme opened this issue Jan 4, 2017 · 5 comments
Closed

Cannot pass options using a double dash to WP-CLI in 1.0.0-beta.1 #1505

ataylorme opened this issue Jan 4, 2017 · 5 comments

Comments

@ataylorme
Copy link

ataylorme commented Jan 4, 2017

Specifically any items starting with a double dash, like --format=json. The same commands work fine with WP-CLI locally. This is blocking me from updating WordPress at Scale Auto Updates to Terminus 1.x.

Expected behavior

WP-CLI output returned

Actual behavior

No WP-CLI output returned

Steps to reproduce the behavior

Run terminus wp SITE.ENV -- plugin list to see a working command

terminus wp 02854fa0-b6e4-4349-932a-8aa7d9cab884.dev -vvv -- plugin list
 [debug] #### REQUEST ####
Params: {"headers":{"User-Agent":"Terminus\/1.0.0-beta.1 (php_version=7.0.11&script=bin\/terminus)","Content-type":"application\/json","Authorization":"Bearer 06abca22-e65f-4cbb-8577-6ef3fdb6c758:87ac0400-d2bc-11e6-8fb4-bc764e105ecb:c46vdflsyauIeUDMkSqEv"},"verify":true,"method":"get","absolute_url":false}
URI: https://terminus.pantheon.io:443/api/sites/02854fa0-b6e4-4349-932a-8aa7d9cab884?site_state=true
Method: get
 [debug] #### REQUEST ####
Params: {"headers":{"User-Agent":"Terminus\/1.0.0-beta.1 (php_version=7.0.11&script=bin\/terminus)","Content-type":"application\/json","Authorization":"Bearer 06abca22-e65f-4cbb-8577-6ef3fdb6c758:87ac0400-d2bc-11e6-8fb4-bc764e105ecb:c46vdflsyauIeUDMkSqEv"},"verify":true,"method":"get","absolute_url":false,"options":{"method":"get"}}
URI: https://terminus.pantheon.io:443/api/sites/02854fa0-b6e4-4349-932a-8aa7d9cab884/environments
Method: get
 [warning] This environment is in read-only Git mode. If you want to make changes to the codebase of this site (e.g. updating modules or plugins), you will need to toggle into read/write SFTP mode first.
tput: No value for $TERM and no -T specified
+--------------------------------+----------+-----------+-----------+
| name                           | status   | update    | version   |
+--------------------------------+----------+-----------+-----------+
| advanced-tinymce-configuration | active   | none      | 1.3       |
| akismet                        | inactive | none      | 3.2       |
| wp-gfm                         | active   | none      | 0.8       |
| hello                          | inactive | none      | 1.6       |
| link-library                   | active   | none      | 5.9.13.15 |
| wp-native-php-sessions         | active   | none      | 0.6.0     |
| pantheon-wpms-github-sync      | active   | none      |           |
| regenerate-thumbnails          | active   | none      | 2.2.6     |
| solr-power                     | active   | none      | 1.0.0     |
| wp-github-sync                 | active   | available | 1.7.4     |
| wp-redis                       | active   | none      | 0.6.0     |
| wordpress-seo                  | active   | none      | 4.0.2     |
| pantheon                       | must-use | none      | 0.1       |
+--------------------------------+----------+-----------+-----------+
 [notice] Command: wp-microsite.dev -- 'wp plugin list' [Exit: 0]

Run terminus wp SITE.ENV -- plugin list --field=name to see output fail

terminus wp 02854fa0-b6e4-4349-932a-8aa7d9cab884.dev -vvv -- plugin list --field=name
 [debug] #### REQUEST ####
Params: {"headers":{"User-Agent":"Terminus\/1.0.0-beta.1 (php_version=7.0.11&script=bin\/terminus)","Content-type":"application\/json","Authorization":"Bearer 06abca22-e65f-4cbb-8577-6ef3fdb6c758:87ac0400-d2bc-11e6-8fb4-bc764e105ecb:c46vdflsyauIeUDMkSqEv"},"verify":true,"method":"get","absolute_url":false}
URI: https://terminus.pantheon.io:443/api/sites/02854fa0-b6e4-4349-932a-8aa7d9cab884?site_state=true
Method: get
 [debug] #### REQUEST ####
Params: {"headers":{"User-Agent":"Terminus\/1.0.0-beta.1 (php_version=7.0.11&script=bin\/terminus)","Content-type":"application\/json","Authorization":"Bearer 06abca22-e65f-4cbb-8577-6ef3fdb6c758:87ac0400-d2bc-11e6-8fb4-bc764e105ecb:c46vdflsyauIeUDMkSqEv"},"verify":true,"method":"get","absolute_url":false,"options":{"method":"get"}}
URI: https://terminus.pantheon.io:443/api/sites/02854fa0-b6e4-4349-932a-8aa7d9cab884/environments
Method: get
 [warning] This environment is in read-only Git mode. If you want to make changes to the codebase of this site (e.g. updating modules or plugins), you will need to toggle into read/write SFTP mode first.

Expected output from WP-CLI is

advanced-tinymce-configuration
akismet
wp-gfm
hello
link-library
wp-native-php-sessions
pantheon-wpms-github-sync
regenerate-thumbnails
solr-power
wp-github-sync
wp-redis
wordpress-seo
pantheon
@ataylorme
Copy link
Author

@stevector or @greg-1-anderson have you had similar issues with drush commands?

@greg-1-anderson
Copy link
Member

$ terminus drush -- my-site.dev status --format=yaml working for me with Terminus 1.0.0-beta.1. Will try some wp commands next.

@greg-1-anderson
Copy link
Member

@ataylorme Works for me:

$ terminus wp wp-update.dev -- plugin list --field=name
akismet
hello
pantheon
 [notice] Command: wp-update.dev -- 'wp plugin list '\''--field=name'\''' [Exit: 0]

@ataylorme
Copy link
Author

@greg-1-anderson weird, same command (on the same site) isn't working for me. I completely blew up my Terminus directory locally, re-downloaded 1.0.0-beta.1 and ran a fresh composer install but that didn't help either.

screen shot 2017-01-05 at 8 00 02 am

I'll proceed with updating the WordPress at Scale update script and see if it fails on CircleCI as well of it's just my machine.

@ataylorme
Copy link
Author

I was unable to re-create this on CIrcleCI, looks like it's just my machine.
screen shot 2017-01-08 at 2 39 59 pm

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

No branches or pull requests

3 participants