[camel-k] branch master updated: fix(cli): help command offline

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel-k] branch master updated: fix(cli): help command offline

astefanutti-2
This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new 17363a6  fix(cli): help command offline
17363a6 is described below

commit 17363a6af83fb440dfbf775588f34d18a9d3e459
Author: Pasquale Congiusti <[hidden email]>
AuthorDate: Thu Jan 14 09:52:17 2021 +0100

    fix(cli): help command offline
   
    Added an annotation to mark the help command to work also disconnected from cluster
   
    Closes #1906
---
 pkg/cmd/root.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go
index c56d369..183a7a8 100644
--- a/pkg/cmd/root.go
+++ b/pkg/cmd/root.go
@@ -160,6 +160,7 @@ func addHelpSubCommands(cmd *cobra.Command, options *RootCmdOptions) error {
  if helpCmd == nil {
  return errors.New("could not find any configured help command")
  }
+ helpCmd.Annotations = map[string]string{offlineCommandLabel: "true"}
 
  helpCmd.AddCommand(cmdOnly(newTraitHelpCmd(options)))