Bug 1760587 - odo incorrectly report invalid flag when a non existent command is used
Summary: odo incorrectly report invalid flag when a non existent command is used
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: odo
Version: 4.2.0
Hardware: Unspecified
OS: Windows
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Tomáš Král
QA Contact: Amit
Yana Hontyk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-10 21:23 UTC by Yana Hontyk
Modified: 2019-12-10 13:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-10 13:44:27 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift odo issues 1911 'None' 'open' 'odo incorrectly report invalid flag when a non existent command is used' 2019-12-09 06:46:47 UTC

Description Yana Hontyk 2019-10-10 21:23:19 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  odo app create --project springproject jeffapp

Actual results:

Error: unknown flag: --project                                                                               
Usage:                                                                                                       
  odo app [flags]                                                                                            
  odo app [command]                                                                                          
                                                                                                             
Aliases:                                                                                                     
  app, application                                                                                           
                                                                                                             
Examples:                                                                                                    
  # Delete the application                                                                                   
  odo app delete myapp                                                                                       
  # Describe 'webapp' application,                                                                           
  odo app describe webapp                                                                                    
  # List all applications in the current project                                                             
  odo app list                                                                                               
                                                                                                             
  # List all applications in the specified project                                                           
  odo app list --project myproject                                                                           
                                                                                                             
Available Commands:                                                                                          
  delete      Delete the given application                                                                   
  describe    Describe the given application                                                                 
  list        List all applications in the current project                                                   
                                                                                                             
Flags:                                                                                                       
  -h, --help   Help for app                                                                                  
                                                                                                             
Global Flags:                                                                                                
      --skip-connection-check   Skip cluster check                                                           
  -v, --v Level                 Log level for V logs. Level varies from 0 to 9 (default 0).                  
      --vmodule moduleSpec      Comma-separated list of pattern=N settings for file-filtered logging         
                                                                                                             
Use "odo app [command] --help" for more information about a command.                                         
                                                                                                             
 X  unknown flag: --projec

Expected results:

Should report that the create command is not valid, not the --project flag incorrect

Additional info:

Comment 1 Tomáš Král 2019-12-10 13:44:27 UTC
We change this behavior we would have to change it in the Cobra library, which means either submitting path upstream or carrying our potched version. Both options are quite a lot o work, and I don't think it is worth investing in changing this.


Note You need to log in before you can comment on or make changes to this bug.