Skip to content

Commit

Permalink
Adds identification of unknown sub-commands
Browse files Browse the repository at this point in the history
 Fixes knative#111
 ```
 ➜ ./kn service list
 unknown command "list" for "kn service"
 ➜ echo $?
 1
 ➜ ./kn revision list
 unknown command "list" for "kn revision"
 ➜ echo $?
 1
 ```
  • Loading branch information
navidshaikh committed May 15, 2019
1 parent 5e5b460 commit 8b44670
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kn/commands/revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ func NewRevisionCommand(p *KnParams) *cobra.Command {
revisionCmd := &cobra.Command{
Use: "revision",
Short: "Revision command group",
Args: cobra.NoArgs,
Run: func(*cobra.Command, []string) {},
}
revisionCmd.AddCommand(NewRevisionGetCommand(p))
revisionCmd.AddCommand(NewRevisionDescribeCommand(p))
Expand Down
2 changes: 2 additions & 0 deletions pkg/kn/commands/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ func NewServiceCommand(p *KnParams) *cobra.Command {
serviceCmd := &cobra.Command{
Use: "service",
Short: "Service command group",
Args: cobra.NoArgs,
Run: func(*cobra.Command, []string) {},
}
serviceCmd.AddCommand(NewServiceGetCommand(p))
serviceCmd.AddCommand(NewServiceDescribeCommand(p))
Expand Down

2 comments on commit 8b44670

@rhuss
Copy link

@rhuss rhuss commented on 8b44670 Jun 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@navidshaikh Do you have an PR open for this commit ?

@navidshaikh
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhuss : Not yet.

Please sign in to comment.