aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.82k stars 820 forks source link

help command not working for some subcommands (`add|update|remove <category>`) #12432

Open ykethan opened 1 year ago

ykethan commented 1 year ago

How did you install the Amplify CLI?

No response

If applicable, what version of Node.js are you using?

No response

Amplify CLI Version

11.0.3

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

none

Describe the bug

When adding working help command that contains a sub command, the output does not provide the correct information. the output also contains

Use "amplify status <subcommand> -h" to see subcommand-specific help

for example:

amplify status api -h
USAGE
  amplify status [-v | --verbose]

DESCRIPTION
  Shows the state of local resources not yet pushed to the cloud

SUBCOMMANDS
  [category]  Shows the state of local resources not yet pushed to the cloud

  Use "amplify status <subcommand> -h" to see subcommand-specific help

FLAGS
  -v | --verbose  Shows verbose details, including cloudformation differences

LEARN MORE
  https://docs.amplify.aws/cli/commands/status
amplify add -h api
USAGE
  amplify add <category>

  Where <category> is one of: notifications, api, auth, custom, storage,
  analytics, function, geo, hosting, interactions, predictions

DESCRIPTION
  Adds a resource for an Amplify category in your local backend

SUBCOMMANDS
  <category>  Adds a resource for an Amplify category in your local backend

  Use "amplify add <category> -h" to see subcommand-specific help

LEARN MORE
  https://docs.amplify.aws/cli/commands/add

Expected behavior

subcommands should be correctly dispalyed on the help command

Reproduction steps

  1. run amplify status api -h
  2. or amplify add -h api

Project Identifier

No response

Log output

``` # Put your logs below this line ```

Additional information

No response

Before submitting, please confirm:

josefaidt commented 1 year ago

an example

➜  amplify add api -h
amplify api <subcommands>

  add                      Takes you through a CLI flow to add a api resource to your local backend                                                               
  push                     Provisions api cloud resources and its dependencies with the latest local developments                                                 
  remove                   Removes api resource from your local backend which would be removed from the cloud on the next push command                            
  update                   Takes you through steps in the CLI to update an api resource                                                                           
  gql-compile              Compiles your GraphQL schema and generates a corresponding cloudformation template                                                     
  add-graphql-datasource   Provisions the AppSync resources and its dependencies for the provided Aurora Serverless data source                                   
  console                  Opens the web console for the selected api service                                                                                     
  migrate                  Migrates GraphQL schemas to the latest GraphQL transformer version                                                                     
  rebuild                  Removes and recreates all DynamoDB tables backing a GraphQL API. Useful for resetting test data during the development phase of an app 
  override                 Generates overrides file to apply custom modifications to CloudFormation  
josefaidt commented 1 year ago

relevant https://github.com/aws-amplify/amplify-cli/pull/12190