diff --git a/pkg/kn/commands/root.go b/pkg/kn/commands/root.go index 30d0ac6e8..08f9411df 100644 --- a/pkg/kn/commands/root.go +++ b/pkg/kn/commands/root.go @@ -65,6 +65,9 @@ func NewKnCommand(params ...KnParams) *cobra.Command { Serving: Manage your services and release new software to them. Build: Create builds and keep track of their results. Eventing: Manage event subscriptions and channels. Connect up event sources.`, + + // Affects children as well + SilenceUsage: true, } if p.Output != nil { rootCmd.SetOutput(p.Output) diff --git a/pkg/kn/commands/service_describe.go b/pkg/kn/commands/service_describe.go index b5c365230..cc202800b 100644 --- a/pkg/kn/commands/service_describe.go +++ b/pkg/kn/commands/service_describe.go @@ -30,15 +30,14 @@ func NewServiceDescribeCommand(p *KnParams) *cobra.Command { Use: "describe NAME", Short: "Describe available services.", RunE: func(cmd *cobra.Command, args []string) error { + if len(args) < 1 { + return errors.New("requires the service name.") + } client, err := p.ServingFactory() if err != nil { return err } - if len(args) < 1 { - return errors.New("requires the service name.") - } - namespace := cmd.Flag("namespace").Value.String() describeService, err := client.Services(namespace).Get(args[0], v1.GetOptions{}) if err != nil {