pantheon-systems / terminus

The Pantheon CLI — a standalone utility for performing operations on the Pantheon Platform
https://pantheon.io
Other
315 stars 194 forks source link

[2.2.0] Terminus installed via composer is missing the `--filter` option. #2038

Open uberhacker opened 4 years ago

uberhacker commented 4 years ago

Expected behavior

$ terminus site:list -h
Usage:
  site:list [options]
  sites
  site:list Displays the list of all sites accessible to the currently logged-in user.
  site:list --name=<regex> Displays a list of accessible sites with a name that matches <regex>.
  site:list --org=<org> Displays a list of accessible sites associated with the <org> organization.
  site:list --org=all Displays a list of accessible sites associated with any organization of which the currently logged-in is a member.
  site:list --owner=<user> Displays the list of accessible sites owned by the user with UUID <user>.
  site:list --owner=me Displays the list of sites owned by the currently logged-in user.
  site:list --plan=<plan> Displays the list of sites with a plan of this name
  site:list --team Displays the list of sites of which the currently logged-in user is a member of the team.
  site:list --upstream=<upstream> Displays the list of sites with the upstream having UUID <upstream>.

Options:
      --name[=NAME]          DEPRECATED Name filter
      --org[=ORG]            DEPRECATED Organization filter; "all" or an organization's name, label, or ID [default: "all"]
      --owner[=OWNER]        Owner filter; "me" or user UUID
      --plan[=PLAN]          DEPRECATED Plan filter; filter by the plan's label
      --team                 Team-only filter
      --upstream[=UPSTREAM]  Upstream name to filter
      --format=FORMAT        Format the result data. Available formats: csv,json,list,null,php,print-r,sections,string,table,tsv,var_dump,var_export,xml,yaml [default: "table"]
      --fields=FIELDS        Available fields: Name (name), ID (id), Plan (plan_name), Framework (framework), Region (region), Owner (owner), Created (created), Memberships (memberships), Is Frozen? (frozen), Date frozen (last_frozen_at) [default: "name,id,plan_name,framework,region,owner,created,memberships,frozen"]
      --field=FIELD          Select just one field, and force format to 'string'. [default: ""]
      --filter[=FILTER]      Filter output based on provided expression [default: ""]
  -h, --help                 Display this help message
  -q, --quiet                Do not output any message
  -V, --version              Display this application version
      --ansi                 Force ANSI output
      --no-ansi              Disable ANSI output
  -n, --no-interaction       Do not ask any interactive question
  -y, --yes                  Answer all confirmations with "yes"
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Displays the list of sites accessible to the currently logged-in user.

Actual behavior

$ terminus site:list -h
Usage:
  site:list [options]
  sites
  site:list Displays the list of all sites accessible to the currently logged-in user.
  site:list --name=<regex> Displays a list of accessible sites with a name that matches <regex>.
  site:list --org=<org> Displays a list of accessible sites associated with the <org> organization.
  site:list --org=all Displays a list of accessible sites associated with any organization of which the currently logged-in is a member.
  site:list --owner=<user> Displays the list of accessible sites owned by the user with UUID <user>.
  site:list --owner=me Displays the list of sites owned by the currently logged-in user.
  site:list --plan=<plan> Displays the list of sites with a plan of this name
  site:list --team Displays the list of sites of which the currently logged-in user is a member of the team.
  site:list --upstream=<upstream> Displays the list of sites with the upstream having UUID <upstream>.

Options:
      --name[=NAME]          DEPRECATED Name filter
      --org[=ORG]            DEPRECATED Organization filter; "all" or an organization's name, label, or ID [default: "all"]
      --owner[=OWNER]        Owner filter; "me" or user UUID
      --plan[=PLAN]          DEPRECATED Plan filter; filter by the plan's label
      --team                 Team-only filter
      --upstream[=UPSTREAM]  Upstream name to filter
      --format=FORMAT        Format the result data. Available formats: csv,json,list,null,php,print-r,sections,string,table,tsv,var_dump,var_export,xml,yaml [default: "table"]
      --fields=FIELDS        Available fields: Name (name), ID (id), Plan (plan_name), Framework (framework), Region (region), Owner (owner), Created (created), Memberships (memberships), Is Frozen? (frozen), Date frozen (last_frozen_at) [default: "name,id,plan_name,framework,region,owner,created,memberships,frozen"]
      --field=FIELD          Select just one field, and force format to 'string'. [default: ""]
  -h, --help                 Display this help message
  -q, --quiet                Do not output any message
  -V, --version              Display this application version
      --ansi                 Force ANSI output
      --no-ansi              Disable ANSI output
  -n, --no-interaction       Do not ask any interactive question
  -y, --yes                  Answer all confirmations with "yes"
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Displays the list of sites accessible to the currently logged-in user.

Steps to reproduce the behavior

Install the latest terminus release using composer. The --filter option is available from the phar release.

greg-1-anderson commented 4 years ago

Cannot reproduce; suspect installation error. Ensure that all of Terminus' dependencies are up-to-date. I get the following dependencies with both the Composer installation (composer require) and a git clone; composer install:

$ composer info consolidation/*
consolidation/annotated-command          2.12.0 Initialize Symfony Console commands from annotated command class meth...
consolidation/comments                   1.0.2  A tool for preserving comments, e.g. when parsing YAML files.
consolidation/config                     1.2.1  Provide configuration services for a commandline tool.
consolidation/filter-via-dot-access-data 1.0.0  This project uses dflydev/dot-access-data to provide simple output fi...
consolidation/log                        1.1.1  Improved Psr-3 / Psr\Log logger based on Symfony Console components.
consolidation/output-formatters          3.5.0  Format text by applying transformations provided by plug-in formatters.
consolidation/robo                       1.4.11 Modern task runner
consolidation/self-update                1.1.5  Provides a self:update command for Symfony Console applications.
uberhacker commented 4 years ago

Cannot reproduce on Mac? Maybe try your favorite Linux distro?

~/.config/composer/global/pantheon-systems/terminus/vendor/pantheon-systems/terminus $ which terminus
/home/ed/.config/composer/vendor/bin/terminus
~/.config/composer/global/pantheon-systems/terminus/vendor/pantheon-systems/terminus $ composer info consolidation/*
consolidation/annotated-command          2.12.0 Initialize Symfony Console ...
consolidation/comments                   1.0.2  A tool for preserving comme...
consolidation/config                     1.2.1  Provide configuration servi...
consolidation/filter-via-dot-access-data 1.0.0  This project uses dflydev/d...
consolidation/log                        1.1.1  Improved Psr-3 / Psr\Log lo...
consolidation/output-formatters          3.5.0  Format text by applying tra...
consolidation/robo                       1.4.11 Modern task runner
consolidation/self-update                1.1.5  Provides a self:update comm...

System info:

$ uname -a
Linux dell-precision-m6700 4.15.0-1-amd64 #1 SMP Debian 4.15.4-1~mx17+1 (2018-02-23) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: MX
Description:    MX 18.3 Continuum
Release:    18.3
Codename:   Continuum
$ php -v
PHP 7.2.24-1+0~20191026.31+debian9~1.gbpbbacde (cli) (built: Oct 26 2019 14:18:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.24-1+0~20191026.31+debian9~1.gbpbbacde, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans
$ composer -V
Composer version 1.9.1 2019-11-01 17:20:17
$ terminus -V
Terminus 2.2.0
uberhacker commented 4 years ago

Did I mention the phar version does have the --filter option?