Skip to content

Commit

Permalink
Fix weird subcommand missing output (#1858)
Browse files Browse the repository at this point in the history
Removes the odd missing subcommand output. Now it outputs like so:

```sh
 ✗  Subcommand not found, use one of the available commands: app, catalog, component, config, create, delete, describe, help, link, list, log, login, logout, preference, project, push, service, storage, unlink, update, url, utils, version, watch
```

Closes #1800
  • Loading branch information
cdrage authored and openshift-merge-robot committed Jun 25, 2019
1 parent 36807a3 commit 0f2b414
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/odo/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ func ShowSubcommands(cmd *cobra.Command, args []string) error {
var strs []string
for _, subcmd := range cmd.Commands() {
if !subcmd.Hidden {
strs = append(strs, subcmd.Use)
strs = append(strs, subcmd.Name())
}
}
return fmt.Errorf("Use one of available subcommands: %s", strings.Join(strs, ", "))
return fmt.Errorf("Subcommand not found, use one of the available commands: %s", strings.Join(strs, ", "))
}

0 comments on commit 0f2b414

Please sign in to comment.